1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lstu_ynh.git synced 2024-09-03 19:36:12 +02:00
lstu_ynh/conf/nginx.conf

37 lines
1.2 KiB
Nginx Configuration File
Raw Normal View History

2017-02-02 19:13:28 +01:00
location __PATH__ {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
# This is important for user's privacy !
access_log off;
2017-02-02 19:14:09 +01:00
error_log /var/log/nginx/lstu.error.log;
2017-02-02 19:13:28 +01:00
# This is important ! Make it OK with your Lutim configuration
client_max_body_size 40M;
proxy_pass http://127.0.0.1:__PORT__;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 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;
# We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite$
proxy_redirect off;
}