searching example config for my setup

Jelle de Jong jelledejong at powercraft.nl
Thu May 19 17:46:26 MSD 2011


Dear Antoine,

Thank you for taking the time to help.

On 19-05-11 14:39, Antoine Bonavita wrote:
> Did you try "proxy_set_header  X-Real-IP  $remote_addr;" ?

I did, but it sill shows the IP-addr of the nginx server....

server {
    listen      80;
    server_name sandbox01.powercraft.nl;
    access_log  /var/log/nginx/sandbox01.powercraft.nl.access.log;
    location / {
        proxy_pass          http://192.168.24.63/;
        proxy_set_header    X-Real-IP  $remote_addr;
        proxy_set_header    Host $host;
    }
}

# tail -n 1 /var/log/nginx/sandbox01.powercraft.nl.access.log;
109.32.215.197 - - [19/May/2011:15:42:41 +0200] "GET
/themes/garland/print.css?1 HTTP/1.1" 304 0
"http://sandbox01.powercraft.nl/admin/settings" "Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.04 (lucid)
Firefox/3.6.15"

# tail -n 1 /var/log/apache2/sandbox01.powercraft.nl/access-default.log
192.168.24.62 - - [19/May/2011:15:42:41 +0200] "GET
/themes/garland/print.css?1 HTTP/1.0" 304 173
"http://sandbox01.powercraft.nl/admin/settings" "Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.04 (lucid)
Firefox/3.6.15"

# 192.168.24.62 is the IP of the nginx server

Any ideas? Tips?

Kind regards,

Jelle de Jong

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: OpenPGP digital signature
URL: <http://nginx.org/pipermail/nginx/attachments/20110519/2393f927/attachment-0001.pgp>


More information about the nginx mailing list