Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need help for this problem. My django applications using mod_wsgi, apache and reverse proxy using nginx. the nginx is listen to port 80, and our apps is live inside VPS. And the MOD WSGI is in nginx proxy passed request to

One day, our administrator give us IP ( this IP is dummy ).

What I face, in nginx it still listen to port 80, not 8050, and it works for opening the login page for first time(request.GET) and able to browse. But, when I click submit, it always redirect to, so error 404 always occured. (there is another application in

In short, I open, click submit, it redirect to, and error 404.

Can someone please help me, explain whats wrong here? My administrator blamed my webserver, and said that it (django platform, nginx or whatever lah) only can perform in port 80.

And please give me feedback, what is the solution of my problem?

Please help me. Thank you

share|improve this question

migrated from Aug 25 '11 at 21:10

This question came from our site for professional and enthusiast programmers.

For this to work at all times, you should redirect to http://hostname:port/path, not just /path. When using django.contrib.auth, you can override e.g. LOGIN_REDIRECT_URL in

Generally, you could use contrib.sites framework and pass Site.objects.get_current().domain where needed.

share|improve this answer
Hi ayanami, I think my explanation is not very complete. Sorry about that. so the problem is, there is two kind of IP address. The external one, and internal one. – cactuarz Aug 26 '11 at 2:20
The external ( public ) one is It listened by NGINX, but in port 80. Why is that, doesn't have a clue. Is that something called tunneling? Confused The internal IP is It used by mod wsgi. So the flow is, user send to, it received by NGINX in port 80 and proxy passed it to What I confused is, why every submit, it redirect to – cactuarz Aug 26 '11 at 2:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.