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

Alright so I'm using nginx to forward communication to and from my server and clients. My server receives the communication via port 6543, and nginx forwards it to that port on that server (from port 80 on the nginx proxy server)

It works fine if I enter <- note the trailing slash

but if i enter <- no trailing slash

it becomes which of course doesn't work, because the nginx server isn't expecting anything on that port.

I can't figure out how to fix this. Help?

share|improve this question
You'll get better answers if you post your nginx configuration. – user87664 Jul 24 '11 at 22:35
I don't think that's going to help with only 8 views, anyway. – Rob Jul 24 '11 at 22:48

You need to set port_in_redirect to off on the back-end server use proxy_redirect on the front-end server.

share|improve this answer
Man I am failing so terribly. – Rob Jul 25 '11 at 21:34

You would have to rewrite your application to redirect to a different port than the one it thinks it's using.

Also, some proxy/caching servers do have utilities for stripping a port number from a redirect. Yet I don't recall NGINX having this.

share|improve this answer

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.