Sometimes my urls get masked with the IP address instead of the domain

Posted by user64631 on Server Fault See other posts from Server Fault or by user64631
Published on 2010-12-24T18:37:40Z Indexed on 2010/12/24 18:55 UTC
Read the original article Hit count: 365

Filed under:
|

I have a server with one A record that points to my IP address.

I have nginx with gunicorn as a prefork which goes to my django application

For most of my pages, the URL is always my domain name in the url bar.

However if I go to mydomain.com/admin

the url magically transforms into x.x.x.x/admin in the url bar of my browser.

I thought that was weird but I ignored it figuring it only happened for admin so it wasnt that big of a deal.

Then I installed django-registration. So when I go to mydomain.com/accounts/register the url is still mydomain.com/accounts/register in the url bar. but when I submit a form, the POST request goes to x.x.x.x/accounts/register which creates a cross domain error. So I decided that it wasnt isolated to the admin and I really need to fix what is going on.

I have no idea what is going on and am completely lost.

© Server Fault or respective owner

Related posts about dns

Related posts about django