1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/epicyon_ynh.git synced 2024-09-03 18:36:08 +02:00
epicyon_ynh/conf/nginx.conf

52 lines
1.5 KiB
Nginx Configuration File
Raw Normal View History

2021-03-01 02:41:36 +01:00
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
2022-08-02 04:04:50 +02:00
location __PATH__/ {
2021-03-01 02:41:36 +01:00
2022-01-27 00:53:06 +01:00
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 $host;
2022-01-27 00:53:06 +01:00
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;
2021-07-14 18:51:23 +02:00
2022-01-27 00:53:06 +01:00
location ~ ^/(icons|images|media|emoji)/(.*)/(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
2021-07-14 18:51:23 +02:00
expires 7d;
proxy_pass http://localhost:__PORT__;
2022-01-27 00:53:06 +01:00
}
2021-07-14 18:51:23 +02:00
2022-01-27 00:53:06 +01:00
location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
2021-07-14 18:51:23 +02:00
expires epoch;
proxy_no_cache 1;
proxy_pass http://localhost:__PORT__;
2022-01-27 00:53:06 +01:00
}
2021-07-14 18:51:23 +02:00
2022-01-27 00:53:06 +01:00
location ~ ^/icons/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
2021-07-14 18:51:23 +02:00
expires epoch;
proxy_no_cache 1;
proxy_pass http://localhost:__PORT__;
2022-01-27 00:53:06 +01:00
}
2021-07-14 18:51:23 +02:00
2022-01-27 00:53:06 +01:00
location ~ ^/users/(.*)/(image|banner).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
2021-07-14 18:51:23 +02:00
expires epoch;
proxy_no_cache 1;
proxy_pass http://localhost:__PORT__;
2022-01-27 00:53:06 +01:00
}
2021-03-01 02:41:36 +01:00
}