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 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

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.