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:
parent
6e92a341d6
commit
b52ddbb573
1 changed files with 43 additions and 29 deletions
|
@ -1,10 +1,13 @@
|
|||
location __PATH__/ {
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
#gzip on;
|
||||
gzip_disable "msie6";
|
||||
gzip_vary on;
|
||||
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;
|
||||
|
||||
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-Proto $scheme;
|
||||
|
||||
location / {
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
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;
|
||||
etag off;
|
||||
access_log off;
|
||||
|
@ -32,11 +51,6 @@ location __PATH__/ {
|
|||
}
|
||||
|
||||
error_page 500 501 502 503 504 @error;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
||||
location @error {
|
||||
root __FINALPATH__/live/priv/errors;
|
||||
try_files /error.html 502;
|
||||
|
|
Loading…
Add table
Reference in a new issue