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

I have hosted different drupal sites in an Ubuntu server. Nginx is running as a webserver in this server.All sites are working fine. For security reasons i need to enable a Nginx proxy server ahead of the above server. Configured proxy. The following is the configuration file that i used for proxying . The result of this is when i access the url it redirect to

server {
  listen 80;

  location / {

    proxy_set_header Host $proxy_host;
    proxy_set_header Connection Close;
    proxy_redirect  /    /;

I don't need url redirection. i need the base url is

share|improve this question

1 Answer 1

If 'nginx' is running on the same host as, then you have conflict because they are both attempting to use port 80. If that's the issue, you need to move to a new port or a new server.

Also, try removing "proxy_set_header" and "proxy_redirect" directives. They are not essential.

As always, check your access your access and error logs to see if they shed light on what's happening.

share|improve this answer and is running in different server. So both are running on port 80 in different server. – roni Aug 2 '12 at 12:57
Also, try removing "proxy_set_header" and "proxy_redirect" directives. They are not essential. – Mark Stosberg Aug 2 '12 at 13:00

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.