August 2017
Intermediate to advanced
278 pages
8h 53m
English
Building on our previous recipes, we take the existing proxy setup and add an additional directive:
server {
listen 80;
server_name proxystale.nginxcookbook.com;
access_log /var/log/nginx/proxy-access.log combined;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
}
}
Read now
Unlock full access