2020-01-18 10:28:47 +01:00
|
|
|
root __FINALPATH__/live/public;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
if ($scheme = http) {
|
|
|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
|
|
|
}
|
|
|
|
proxy_set_header Accept-Encoding "";
|
|
|
|
try_files $uri @proxy;
|
|
|
|
|
|
|
|
# Include SSOWAT user panel.
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @proxy {
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
proxy_set_header Proxy "";
|
|
|
|
proxy_pass_header Server;
|
|
|
|
|
2020-12-20 00:27:44 +01:00
|
|
|
proxy_pass http://127.0.0.1:__PORT__;
|
2020-01-18 10:28:47 +01:00
|
|
|
proxy_buffering on;
|
|
|
|
proxy_redirect off;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
|
|
|
#proxy_cache CACHE;
|
|
|
|
proxy_cache_valid 200 7d;
|
|
|
|
proxy_cache_valid 410 24h;
|
|
|
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
|
|
|
add_header X-Cached $upstream_cache_status;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000";
|
|
|
|
tcp_nodelay on;
|
|
|
|
}
|
|
|
|
|
|
|
|
error_page 500 501 502 503 504 /500.html;
|