mirror of
https://github.com/YunoHost-Apps/epicyon_ynh.git
synced 2024-09-03 18:36:08 +02:00
Fix
This commit is contained in:
parent
159fd4fe47
commit
be138b6456
2 changed files with 53 additions and 44 deletions
|
@ -1,51 +1,56 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
proxy_http_version 1.1;
|
||||
client_max_body_size 31M;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forward-Proto http;
|
||||
proxy_set_header X-Nginx-Proxy true;
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_temp_file_write_size 64k;
|
||||
proxy_connect_timeout 10080s;
|
||||
proxy_send_timeout 10080;
|
||||
proxy_read_timeout 10080;
|
||||
proxy_buffer_size 64k;
|
||||
proxy_buffers 16 32k;
|
||||
proxy_busy_buffers_size 64k;
|
||||
proxy_redirect off;
|
||||
proxy_request_buffering on;
|
||||
proxy_buffering on;
|
||||
#proxy_cache my_cache;
|
||||
#proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_http_version 1.1;
|
||||
client_max_body_size 31M;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forward-Proto http;
|
||||
proxy_set_header X-Nginx-Proxy true;
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_temp_file_write_size 64k;
|
||||
proxy_connect_timeout 10080s;
|
||||
proxy_send_timeout 10080;
|
||||
proxy_read_timeout 10080;
|
||||
proxy_buffer_size 64k;
|
||||
proxy_buffers 16 32k;
|
||||
proxy_busy_buffers_size 64k;
|
||||
proxy_redirect off;
|
||||
proxy_request_buffering on;
|
||||
proxy_buffering on;
|
||||
#proxy_cache my_cache;
|
||||
#proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
|
||||
|
||||
location ~ ^/(icons|images|media|emoji)/(.*)/(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
|
||||
expires 7d;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
expires 7d;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
|
||||
location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
|
||||
location ~ ^/icons/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
|
||||
location ~ ^/users/(.*)/(image|banner).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
expires epoch;
|
||||
proxy_no_cache 1;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
[Unit]
|
||||
Description=Epicyon: Federated social network server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=__APP__
|
||||
|
@ -11,4 +15,4 @@ StandardError=/var/log/__APP__/__APP__.log
|
|||
CPUQuota=80%
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in a new issue