2016-08-19 22:50:43 +02:00
|
|
|
location __PATH__ {
|
2017-12-05 19:36:40 +01:00
|
|
|
|
2020-01-02 18:40:15 +01:00
|
|
|
# Force usage of https
|
2017-03-19 19:16:10 +01:00
|
|
|
if ($scheme = http) {
|
|
|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
|
|
|
}
|
2015-03-16 21:10:39 +01:00
|
|
|
|
2017-12-05 19:36:40 +01:00
|
|
|
# Include SSOWAT user panel.
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|
2015-03-16 21:10:39 +01:00
|
|
|
|
2017-12-05 19:36:40 +01:00
|
|
|
# This is important for user's privacy !
|
|
|
|
access_log off;
|
|
|
|
error_log /var/log/nginx/lutim.error.log;
|
2015-03-16 21:10:39 +01:00
|
|
|
|
2017-12-05 19:36:40 +01:00
|
|
|
# This is important ! Make it OK with your Lutim configuration
|
|
|
|
client_max_body_size 40M;
|
2015-03-16 21:10:39 +01:00
|
|
|
|
2017-12-05 19:36:40 +01:00
|
|
|
proxy_pass http://127.0.0.1:__PORT__;
|
2015-03-16 21:10:39 +01:00
|
|
|
|
2017-12-05 19:36:40 +01:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
2015-03-16 21:10:39 +01:00
|
|
|
|
2017-12-05 19:36:40 +01:00
|
|
|
# Lutim reads this header and understands that the current session is actually HTTPS.
|
|
|
|
# Enable it if you run a HTTPS server (in this case, don't forgot to change the listen port
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
2015-03-16 21:10:39 +01:00
|
|
|
|
2017-12-05 19:36:40 +01:00
|
|
|
# We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite
|
|
|
|
proxy_redirect off;
|
2015-03-16 21:10:39 +01:00
|
|
|
}
|