Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 85;
- keepalive_timeout 30;
- root /var/cache/munin/www/;
- location /munin/static/ {
- alias /etc/munin/static/;
- }
- location ^~ /munin-cgi/munin-cgi-graph/ {
- access_log off;
- fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_pass unix:/var/run/munin/fcgi-graph.sock;
- include fastcgi_params;
- }
- }
- server {
- listen 80;
- listen 443 ssl http2;
- server_name test.anilibria.tv;
- ssl_certificate /etc/letsencrypt/live/test.anilibria.tv/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/test.anilibria.tv/privkey.pem;
- location ~* \.(m3u8|ts)$ {
- access_log /var/log/nginx/cache-access.log cache;
- proxy_pass http://x.anilibria.tv;
- proxy_cache STATIC;
- proxy_cache_valid 404 302 1m;
- proxy_cache_valid 200 1y;
- proxy_ignore_headers Set-Cookie Expires Cache-Control;
- proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
- # clean cache curl https://test.anilibria.tv/videos/ts/4576/0001/fff1.ts -s -I -H "965f76362acf00a460d86c8b40911ca2:true"
- proxy_cache_bypass $http_965f76362acf00a460d86c8b40911ca2;
- add_header X-Cache-Status $upstream_cache_status; # show cache status
- # dont block process
- # https://img.poiuty.com/img/08/e75c6adde3ee57e4bff48a3bc0b70908.png
- # https://img.poiuty.com/img/1d/adbe5915344c83528f0b1a6bbac2951d.png
- # https://nginx.org/ru/docs/http/ngx_http_core_module.html#aio
- # https://habrahabr.ru/post/260669/
- #aio threads;
- #aio_write on;
- #sendfile_max_chunk 512k;
- }
- location /.well-known/ { # letsencrypt
- root /var/www/html;
- }
- location / {
- return 403;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement