I have just copied a working Django project from a development server to a production server. I have not touched the code in any way. In the admin interface there is a blog app, in each blog post there is a get_absolute_url so the admin creates the "view on site" button. On the development server when I click this button it opens the post on the site as expected: an example link would be /admin/r/25/515/ which when loaded then redirects to /blog_app/posts/515/slug. That's perfect. On the production server though the "view on site" link has the exact same value of /admin/r/25/515/ but when loaded returns a strange url that leads to nowhere: admin/r/25/515/.com/blog_app/posts/515/slug. I have no idea where this ".com" comes from, I started looking everywhere but have no clue. Any idea?
Asked
Active
Viewed 917 times
1
-
1Did you adjust the Site-Setting?: http://stackoverflow.com/a/344909/630877 – arie Apr 18 '12 at 18:29
-
well the database is shared between those hosts for now so the site setting is the same and it is set to the domain name – Bastian Apr 19 '12 at 09:19
1 Answers
1
That was an Nginx conf problem, I use it as a proxy / load balancer and in the proxy_pass setting I did not enter the full domain name thinking it was a kind of variable. My bad. Not really Django related but since many people use it that way it can be useful to know.

Bastian
- 5,625
- 10
- 44
- 68