title: nginx as frontend for apache
body: <p>I have nginx as frontend for apache. Apache listen port 8008.</p>
  
  <p>Nginx config</p>
  
  <pre><code>server {
          listen 80;
          server_name SERVER_NAME;
          location / {
              proxy_set_header   X-Real-IP            $remote_addr;
              proxy_set_header   X-Forwarded-For  proxy_add_x_forwarded_for;
              proxy_set_header   Host                   $http_host;
              proxy_pass         http://localhost:8008;
          }    
  }
  </code></pre>
  
  <p>When I open url SERVER_NAME, browser actualy opens url SERVER_NAME:8008. And apache respons to the browser, not nginx.</p>