118 lines
3.3 KiB
Plaintext
Executable File
118 lines
3.3 KiB
Plaintext
Executable File
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server{
|
|
listen $SWEBSOCKET_PORT ssl;
|
|
ssl_certificate $JC_CERT/fullchain.pem;
|
|
ssl_certificate_key $JC_CERT/privkey.pem;
|
|
|
|
location / {
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://$NET$WEBSERVER:9000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 120s;
|
|
}
|
|
}
|
|
|
|
# Ouverture du flux sur le port 80 pour le player de PAC
|
|
server {
|
|
listen 80;
|
|
server_name $JC_SERVICE mux.$JC_SERVICE;
|
|
location /direct.ogg {
|
|
client_max_body_size 0;
|
|
proxy_pass http://$NET$ICECAST:8000/direct.ogg;
|
|
# kill cache
|
|
add_header Last-Modified $date_gmt;
|
|
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
if_modified_since off;
|
|
expires off;
|
|
etag off;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name $JC_SERVICE mux.$JC_SERVICE;
|
|
ssl_certificate $JC_CERT/fullchain.pem;
|
|
ssl_certificate_key $JC_CERT/privkey.pem;
|
|
|
|
root "$DATA_DIR/soundbase/website";
|
|
|
|
location = /favicon.ico {
|
|
try_files /favicon.webp =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location /soundbase {
|
|
alias "$DATA_DIR/soundbase";
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location ~ /muxapi(/.*) {
|
|
include uwsgi_params;
|
|
uwsgi_param PATH_INFO "$1";
|
|
uwsgi_param SCRIPT_NAME /api;
|
|
uwsgi_pass unix:/tmp/uwsgi/$JC_SERVICE/uwsgi-api.sock;
|
|
client_max_body_size 0;
|
|
proxy_connect_timeout 6000;
|
|
proxy_send_timeout 60000;
|
|
proxy_read_timeout 6000;
|
|
send_timeout 6000;
|
|
# kill cache
|
|
add_header Last-Modified $date_gmt;
|
|
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
add_header Access-Control-Allow-Origin https://soundbase.$JC_SERVICE;
|
|
if_modified_since off;
|
|
expires off;
|
|
etag off;
|
|
}
|
|
|
|
|
|
|
|
location /direct.ogg {
|
|
client_max_body_size 0;
|
|
proxy_pass http://$NET$ICECAST:8000/direct.ogg;
|
|
# kill cache
|
|
add_header Last-Modified $date_gmt;
|
|
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
if_modified_since off;
|
|
expires off;
|
|
etag off;
|
|
}
|
|
location /direct.mp3 {
|
|
client_max_body_size 0;
|
|
proxy_pass http://$NET$ICECAST:8000/direct.mp3;
|
|
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
}
|
|
location /icecast/style.css {
|
|
client_max_body_size 0;
|
|
proxy_pass http://$NET$ICECAST:8000/style.css;
|
|
}
|
|
location /icecast/status.xsl {
|
|
client_max_body_size 0;
|
|
proxy_pass http://$NET$ICECAST:8000/status.xsl;
|
|
# kill cache
|
|
add_header Last-Modified $date_gmt;
|
|
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
if_modified_since off;
|
|
expires off;
|
|
etag off;
|
|
}
|
|
<<<<<<< HEAD
|
|
=======
|
|
|
|
location /manager {
|
|
return 301 https://$SOUNDBASE_HOST/manager;
|
|
}
|
|
>>>>>>> 9f3b59b (next step)
|
|
}
|