# # !!! This file is managed by Ansible !!! # server { server_name webmusic.local; listen 81; access_log off; allow 127.0.0.1; deny all; root /var/lib/websites/music.ctu.cx; location / { autoindex on; autoindex_exact_size off; autoindex_format xml; xslt_string_param domain $http_domain; xslt_string_param path $uri; xslt_stylesheet /var/lib/websites/webmusic-assets/webmusic-playlist.xslt; } } server { listen 443 ssl; listen [::]:443 ssl; server_name music.ctu.cx; ssl_certificate "/var/lib/acme-redirect/live/music.ctu.cx/fullchain"; ssl_certificate_key "/var/lib/acme-redirect/live/music.ctu.cx/privkey"; include /etc/nginx/ssl.conf; root /var/lib/websites/music.ctu.cx; location ~ ^(.*/)$ { autoindex on; autoindex_exact_size off; auth_basic 'Auth required'; auth_basic_user_file /etc/nginx/passwd/music.ctu.cx; autoindex_format xml; xslt_string_param path $uri; xslt_stylesheet /var/lib/websites/webmusic-assets/webmusic.xslt; } location ~(.*)playlist.m3u$ { set $url http://127.0.0.1:81$1; proxy_pass $url; proxy_set_header Domain $scheme://$host; proxy_hide_header 'Content-Type'; add_header 'Content-Type' 'text/plain'; } location /assets/ { alias /var/lib/websites/webmusic-assets/; } }