Last active
September 30, 2023 06:24
-
-
Save ssamjh/accd512f3f61152bcced871fb7b19646 to your computer and use it in GitHub Desktop.
icecast-kh Nginx config with IP-Forwarding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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