Set various proxy headers in nginx config
These headers are required for apps like wordpress to figure the site url. It is not clear why they do not just use relative urls. http://cmanios.wordpress.com/2014/04/12/nginx-https-reverse-proxy-to-wordpress-with-apache-http-and-different-port/
This commit is contained in:
@@ -17,6 +17,16 @@ server {
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:<%= port %>;
|
||||
|
||||
proxy_read_timeout 3500;
|
||||
proxy_connect_timeout 3250;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Originating-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user