mirror of
https://github.com/YunoHost-Apps/mobilizon_ynh.git
synced 2024-09-03 19:46:19 +02:00
43 lines
1.2 KiB
Nginx Configuration File
43 lines
1.2 KiB
Nginx Configuration File
#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;
|
|
|
|
# the nginx default is 1m, not enough for large media uploads
|
|
client_max_body_size 50M;
|
|
|
|
proxy_http_version 1.1;
|
|
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-Forwarded-Proto $scheme;
|
|
|
|
location / {
|
|
proxy_pass http://localhost:__PORT__;
|
|
}
|
|
|
|
location ~ ^/(js|css) {
|
|
root __INSTALL_DIR__/live/priv/static;
|
|
etag off;
|
|
access_log off;
|
|
more_set_headers "Cache-Control: public, max-age=31536000, immutable";
|
|
}
|
|
|
|
location ~ ^/(media|proxy) {
|
|
etag off;
|
|
access_log off;
|
|
more_set_headers "Cache-Control: public, max-age=31536000, immutable";
|
|
proxy_pass http://localhost:__PORT__;
|
|
}
|
|
|
|
error_page 500 501 502 503 504 @error;
|
|
location @error {
|
|
root __INSTALL_DIR__/live/priv/errors;
|
|
try_files /error.html 502;
|
|
}
|