1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mobilizon_ynh.git synced 2024-09-03 19:46:19 +02:00

Update nginx.conf

This commit is contained in:
yalh76 2021-07-31 03:33:46 +02:00
parent 6e92a341d6
commit b52ddbb573

View file

@ -1,10 +1,13 @@
location __PATH__/ { #gzip on;
# Force usage of https gzip_disable "msie6";
if ($scheme = http) { gzip_vary on;
rewrite ^ https://$server_name$request_uri? permanent; gzip_proxied any;
} gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/activity+json application/atom+xml;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # the nginx default is 1m, not enough for large media uploads
client_max_body_size 50M; client_max_body_size 50M;
proxy_http_version 1.1; proxy_http_version 1.1;
@ -15,9 +18,25 @@ location __PATH__/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
location / {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
location ~* \.(css|js)$ { # Include SSOWAT user panel.
# include conf.d/yunohost_panel.conf.inc;
}
# Let's Encrypt keeps its files here
location ^~ '/.well-known/acme-challenge' {
root /var/www/certbot;
default_type "text/plain";
}
location ~ ^/(js|css) {
root __FINALPATH__/live/priv/static; root __FINALPATH__/live/priv/static;
etag off; etag off;
access_log off; access_log off;
@ -32,11 +51,6 @@ location __PATH__/ {
} }
error_page 500 501 502 503 504 @error; error_page 500 501 502 503 504 @error;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
location @error { location @error {
root __FINALPATH__/live/priv/errors; root __FINALPATH__/live/priv/errors;
try_files /error.html 502; try_files /error.html 502;