1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lufi_ynh.git synced 2024-09-03 19:36:28 +02:00
lufi_ynh/conf/nginx.conf
2019-03-03 18:04:44 +01:00

32 lines
1.1 KiB
Nginx Configuration File

location __PATH__ {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
access_log /var/log/nginx/lufi.access.log;
error_log /var/log/nginx/lufi.error.log;
# This is important ! Make it OK with your Lutim configuration
client_max_body_size __MAX_FILE_SIZE__M;
proxy_pass http://127.0.0.1:__PORT__;
# Really important ! Lufi uses WebSocket, it won't work without this
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "upgrade" ;
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-Remote-Port $remote_port;
proxy_set_header X-Forwarded-Proto $scheme;
# If you want to log the remote port of the file senders, you'll need that
proxy_set_header X-Remote-Port $remote_port;
# We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite$
proxy_redirect off;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}