Line 169: |
Line 169: |
| #listen [::]:80 default_server; | | #listen [::]:80 default_server; |
| | | |
− | server_name openfoodfacts.eu *.openfoodfacts.eu; | + | server_name openfoodfacts.org *.openfoodfacts.org openfoodfacts.eu *.openfoodfacts.eu; |
| | | |
| # SSL configuration | | # SSL configuration |
Line 183: |
Line 183: |
| root /home/off/html; | | root /home/off/html; |
| | | |
− | access_log /home/off/logs/nginx.access.log; | + | access_log /home/off/logs/nginx.access2.log; |
− | error_log /home/off/logs/nginx.error.log; | + | error_log /home/off/logs/nginx.error2.log; |
| | | |
| gzip on; | | gzip on; |
| gzip_min_length 1000; | | gzip_min_length 1000; |
− |
| |
− | # Forward the client IP header
| |
− | proxy_set_header X-Real-IP $remote_addr;
| |
− | #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
| |
− | proxy_set_header X-Forwarded-For $remote_addr;
| |
| | | |
| | | |
Line 226: |
Line 221: |
| proxy_set_header Host $host; | | proxy_set_header Host $host; |
| proxy_set_header X-Real-IP $remote_addr; | | proxy_set_header X-Real-IP $remote_addr; |
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| + | |
| proxy_pass http://127.0.0.1:8001/cgi/display.pl?; | | proxy_pass http://127.0.0.1:8001/cgi/display.pl?; |
| } | | } |
Line 232: |
Line 229: |
| proxy_set_header Host $host; | | proxy_set_header Host $host; |
| proxy_set_header X-Real-IP $remote_addr; | | proxy_set_header X-Real-IP $remote_addr; |
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_pass http://127.0.0.1:8001; | | proxy_pass http://127.0.0.1:8001; |
| } | | } |
Line 242: |
Line 240: |
| #} | | #} |
| } | | } |
| + | |
| | | |
| </pre> | | </pre> |