introduce proxy_options snippet
This commit is contained in:
parent
476cc11b68
commit
98576f69e1
@ -11,8 +11,6 @@ server {
|
||||
ssl_certificate_key /etc/letsencrypt/live/my.domain.com/privkey.pem;
|
||||
include /etc/nginx/snippets/ssl_options.conf;
|
||||
|
||||
# Configure maximum picture size
|
||||
# Note that Diaspora has a client side check set at 4M
|
||||
client_max_body_size 5M;
|
||||
client_body_buffer_size 256K;
|
||||
|
||||
@ -21,16 +19,6 @@ server {
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.2.1/;
|
||||
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
|
||||
|
||||
proxy_buffering on;
|
||||
proxy_buffers 12 12k;
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
proxy_set_header Host $host;
|
||||
include /etc/nginx/snippets/proxy_options.conf;
|
||||
}
|
||||
}
|
||||
|
@ -21,12 +21,6 @@ server {
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.2.2/;
|
||||
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
include /etc/nginx/snippets/proxy_options.conf;
|
||||
}
|
||||
}
|
||||
|
7
snippets/proxy_options.conf
Normal file
7
snippets/proxy_options.conf
Normal file
@ -0,0 +1,7 @@
|
||||
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
proxy_set_header Host $host;
|
Loading…
Reference in New Issue
Block a user