Message info
 
To:django-users@googlegroups.com From:Karen Tracey Subject:Re: how to display development server page Date:Sun, 18 Mar 2012 12:33:07 -0400
 

On Sat, Mar 17, 2012 at 1:23 AM, Alex Glaros <alexglaros@gmail.com> wrote:
> Newbie trying to run Django for the first time.
>
> I'm using a hosted Linux server; I run python manage.py runserver, and
> get:
>
> Validating models...
>
> 0 errors found
> Django version 1.3.1, using settings 'alexSite.settings'
> Development server is running at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.
>
> But my browser doesn't see anything at http://127.0.0.1:8000/
>
> Any hints? Where is the page, on my PC or the hosted server?

The page will be served by your linux host. However, you can't reach
your linux host from your PC using 127.0.0.1 as the IP address.
127.0.0.1 is a special "loopback" IP address. Traffic for it is never
routed off the local machine. The development server by default
listens only on 127.0.0.1, meaning you cannot reach it from other
machines. If you are trying to reach your linux host from a browser on
your PC using the 127.0.0.1 address, port 8000, what's happening is
your PC browser is trying to reach a server on port 8000 on your PC.
It's never going to find your linux host using the 127.0.0.1 address.

You can make the development server listen on all network interfaces
by starting it via "manage.py runserver 0.0.0.0:8000". (Doc:
https://docs.djangoproject.com/en/1.3/ref/django-admin/#runserver-port-or-address-port).
The all-zero address signals all network interfaces on the machine, so
you don't have to go hunting down the IP address of the linux host.
However to reach it from your PC you will need to know its hostname or
IP address so that you can specify it instead of 127.0.0.1 in the url.

Karen
--
http://tracey.org/kmt/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.