Nginx reverse proxy with IP-Based vhosts apache

skateinmars at skateinmars.net skateinmars at skateinmars.net
Fri Jan 18 19:56:49 MSK 2008


Hello,

this seems more an apache issue.
Have you got a proper NameVirtualHost directive ?
(e.g. NameVirtualHost *:8080 )

> Hi,
>
> I'm looking for comments on my nginx.conf file. I am using nginx to serve
> some static content and proxy to apache for some other requests however I
> think there is something wrong with my proxypass settings.
>
> If I use apache's name based virtual hosts everything works out great,
> however if I use IP based virtual hosts, apache does not direct to the
> right
> virtual host, instead just defaulting to the main Document Root. I can't
> seem to find an answer on Google anywhere, so any feedback is greatly
> appreciated (relevant part of nginx.conf below).
>
>         location / {
>             proxy_pass         http://127.0.0.1:8080/;
>             proxy_redirect     off;
>
>             proxy_set_header   Host             $host;
>             proxy_set_header   X-Real-IP        $remote_addr;
>             proxy_set_header   X-Forwarded-For
> $proxy_add_x_forwarded_for;
>
>             client_max_body_size       10m;
>             client_body_buffer_size    128k;
>
>             proxy_connect_timeout      90;
>             proxy_send_timeout         90;
>             proxy_read_timeout         90;
>
>             proxy_buffer_size          4k;
>             proxy_buffers              4 32k;
>             proxy_busy_buffers_size    64k;
>             proxy_temp_file_write_size 64k;
>         }
>







More information about the nginx mailing list