Nginx reverse proxy with IP-Based vhosts apache

Jamie Quint jsquintz at gmail.com
Sat Jan 19 01:50:46 MSK 2008


I want to use IP-based virtual hosting (not name based with NameVirtualHost)
for purposes of SSL

On Jan 18, 2008 8:56 AM, <skateinmars at skateinmars.net> wrote:

> 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;
> >         }
> >
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080118/2b7a5e8f/attachment.html>


More information about the nginx mailing list