Skip to content

Instantly share code, notes, and snippets.

@ssamjh
Last active September 30, 2023 06:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ssamjh/accd512f3f61152bcced871fb7b19646 to your computer and use it in GitHub Desktop.
Save ssamjh/accd512f3f61152bcced871fb7b19646 to your computer and use it in GitHub Desktop.
icecast-kh Nginx config with IP-Forwarding
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/nginx/ssl/example.com.pem;
ssl_certificate_key /etc/nginx/ssl/example.com.key;
server_name icecast.example.com;
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
subs_filter_types application/xspf+xml audio/x-mpegurl audio/x-vclt text/css text/xml;
subs_filter ':8000/' '/' gi;
subs_filter '@localhost' '@example.com' gi;
subs_filter 'localhost' $host gi;
subs_filter 'Mount Point ' $host gi;
}
location /admin/ {
deny all;
}
location /server_version.xsl {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment