views:

24

answers:

1

I am using django, nginx and apache. When I access my site with a URL (e.g., http://www.foo.com/) what appears in my browser address is the IP address with admin appended (e.g., http://123.45.67.890/admin/). When I access the site by IP, it is redirected as expected by django's urls.py (e.g., http://123.45.67.890/ -> http://123.45.67.890/accounts/login/?next=/)

I would like to have the name URL act the same way as the IP. Where should I be looking to make this happen?

A: 

Do you have virtual domains?
If so, your domain name and your ip address may be served differently.

Sergey