server { listen 80; server_name {{ hostname }}; root /var/www/html; access_log /dev/null; error_log /var/log/nginx/radio_error; client_max_body_size 120M; fastcgi_read_timeout 1600; proxy_read_timeout 1600; index index.html; error_page 403 /403.html; location = /403.html { root /var/www/html; allow all; internal; } location '/.well-known/acme-challenge' { default_type "text/plain"; root /tmp/letsencrypt; autoindex on; } location / { root /var/www/html/; proxy_pass http://{{ host }}:{{ port }}; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; allow all; } location /{{ icecast2_mount }} { allow all; add_header 'Access-Control-Allow-Origin' '*'; proxy_pass http://{{ icecast2_bind_host }}:{{ icecast2_bind_port }}/{{ icecast2_mount }}; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; } }