searching example config for my setup
Antoine Bonavita
antoine.bonavita at gmail.com
Thu May 19 16:39:36 MSD 2011
Hi,
Did you try "proxy_set_header X-Real-IP $remote_addr;" ?
A.
--
Take a break. Visit nginx-land: http://www.nginx-discovery.com ;)
On Thu, May 19, 2011 at 2:29 PM, Jelle de Jong
<jelledejong at powercraft.nl> wrote:
> On 18-05-11 23:28, Jelle de Jong wrote:
>> On 18-05-11 22:28, Jelle de Jong wrote:
>>> I am searching for an example configuration file for nginx for the
>>> follow set-up:
>> Looking at several snippet I made the above config, it seems to partaly
>> do what I want... Is this the correct way (efficient/secure)?
>
> server {
> listen 80;
> server_name a.powercraft.nl;
> access_log /var/log/nginx/a.powercraft.nl.access.log;
> location / {
> proxy_set_header Host $host;
> proxy_pass http://192.168.24.63/;
> }
> }
>
> server {
> listen 80;
> server_name b.powercraft.nl;
> access_log /var/log/nginx/c.powercraft.nl.access.log;
> location / {
> proxy_set_header Host $host;
> proxy_pass http://192.168.24.63/;
> }
> }
>
> server {
> listen 80;
> listen 443;
> server_name c.powercraft.nl;
> access_log /var/log/nginx/c.powercraft.nl.access.log;
> location / {
> proxy_set_header Host $host;
> proxy_pass http://192.168.24.64/;
> }
> }
>
> I did some more research and found:
> http://wiki.nginx.org/HttpProxyModule
> http://wiki.nginx.org/VirtualHostExample
>
> I came up with the above set-up that partly fills my need :)
>
> Is it possbible to for http://192.168.24.63/ to see the IP-address of
> the original browser requesting the http data? Now only the IP of the
> nginx system is logged? (I know this is because of the proxy so I am
> wondering if this is something that can be fixed?)
>
> Is the configuration correct? Can it be improved? Hints & tips?
>
> Kind regards,
>
> Jelle de Jong
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
>
More information about the nginx
mailing list