add nginux icecast configuration
This commit is contained in:
65
icecast.nginx-sites-avaialble
Normal file
65
icecast.nginx-sites-avaialble
Normal file
@ -0,0 +1,65 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name shred.ing;
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
location / {
|
||||
proxy_pass http://localhost:8000/live.mp3;
|
||||
}
|
||||
location ~ play(er)?|html?$ {
|
||||
root /www/shred.ing;
|
||||
try_files $1 /shred.html =404;
|
||||
# kill cache
|
||||
add_header Last-Modified $date_gmt;
|
||||
add_header Cache-Control 'no-store, no-cache';
|
||||
if_modified_since off;
|
||||
expires off;
|
||||
etag off;
|
||||
}
|
||||
location ~ js(on)?$ {
|
||||
root /opt/shred.ing/js;
|
||||
try_files $1 /title.json =404;
|
||||
# kill cache
|
||||
add_header Last-Modified $date_gmt;
|
||||
add_header Cache-Control 'no-store, no-cache';
|
||||
if_modified_since off;
|
||||
expires off;
|
||||
etag off;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name shred.ing;
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
listen [::]:443 ssl; # managed by Certbot
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/shred.ing/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/shred.ing/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
location / {
|
||||
proxy_pass http://localhost:8000/live.mp3;
|
||||
}
|
||||
location ~ play(er)?|html?$ {
|
||||
root /www/shred.ing;
|
||||
try_files $1 /shred.html =404;
|
||||
# kill cache
|
||||
add_header Last-Modified $date_gmt;
|
||||
add_header Cache-Control 'no-store, no-cache';
|
||||
if_modified_since off;
|
||||
expires off;
|
||||
etag off;
|
||||
}
|
||||
location ~ js(on)?$ {
|
||||
root /opt/shred.ing/js;
|
||||
try_files $1 /title.json =404;
|
||||
# kill cache
|
||||
add_header Last-Modified $date_gmt;
|
||||
add_header Cache-Control 'no-store, no-cache';
|
||||
if_modified_since off;
|
||||
expires off;
|
||||
etag off;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user