1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/epicyon_ynh.git synced 2024-09-03 18:36:08 +02:00
This commit is contained in:
ericgaspar 2021-07-14 18:51:23 +02:00
parent 159fd4fe47
commit be138b6456
2 changed files with 53 additions and 44 deletions

View file

@ -5,6 +5,8 @@ location __PATH__/ {
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
proxy_pass http://localhost:__PORT__;
proxy_http_version 1.1; proxy_http_version 1.1;
client_max_body_size 31M; client_max_body_size 31M;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
@ -28,24 +30,27 @@ proxy_request_buffering on;
proxy_buffering on; proxy_buffering on;
#proxy_cache my_cache; #proxy_cache my_cache;
#proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; #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) { location ~ ^/(icons|images|media|emoji)/(.*)/(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires 7d; expires 7d;
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
} }
location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) { location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires epoch; expires epoch;
proxy_no_cache 1; proxy_no_cache 1;
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
} }
location ~ ^/icons/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) { location ~ ^/icons/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires epoch; expires epoch;
proxy_no_cache 1; proxy_no_cache 1;
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
} }
location ~ ^/users/(.*)/(image|banner).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) { location ~ ^/users/(.*)/(image|banner).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires epoch; expires epoch;
proxy_no_cache 1; proxy_no_cache 1;
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
} }
proxy_pass http://localhost:__PORT__;
} }

View file

@ -1,3 +1,7 @@
[Unit]
Description=Epicyon: Federated social network server
After=network.target
[Service] [Service]
Type=simple Type=simple
User=__APP__ User=__APP__