Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have an nginx set up in a very boring fashion as a reverse proxy to an appserver. But sometimes my upstream gets the environment variable SERVER_PORT, sometimes it does not. Anyone suggest why it's not consistent or how I might troubleshoot it?

upstream starman {
   server unix:/var/run/starman.sock;

server {
location / {
  proxy_pass        http://starman;
  proxy_set_header  SERVER_PORT $server_port;
share|improve this question

It may be other location in your config, passing requests without adding SERVER_PORT.

share|improve this answer
no, it's a really boring config. there's only one proxy_pass to here. – dotplus Jun 6 '12 at 16:06

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.