2023-10-16 08:47:35 +00:00
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
default upgrade;
|
|
|
|
'' close;
|
|
|
|
}
|
|
|
|
|
|
|
|
server{
|
2024-01-02 16:50:14 +00:00
|
|
|
listen $SWEBSOCKET_PORT ssl;
|
2023-10-31 15:42:06 +00:00
|
|
|
ssl_certificate $JC_CERT/fullchain.pem;
|
|
|
|
ssl_certificate_key $JC_CERT/privkey.pem;
|
2023-10-16 08:47:35 +00:00
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header Host $host;
|
2023-10-31 15:42:06 +00:00
|
|
|
proxy_pass http://$NET$WEBSERVER:9000;
|
2023-10-16 08:47:35 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_read_timeout 120s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
listen [::]:443 ssl;
|
|
|
|
server_name $JC_SERVICE;
|
2023-10-31 15:42:06 +00:00
|
|
|
ssl_certificate $JC_CERT/fullchain.pem;
|
|
|
|
ssl_certificate_key $JC_CERT/privkey.pem;
|
2023-10-16 08:47:35 +00:00
|
|
|
|
|
|
|
location / {
|
|
|
|
client_max_body_size 0;
|
2024-10-16 09:41:44 +00:00
|
|
|
proxy_pass http://$SOUNDBASE_IP/;
|
|
|
|
proxy_set_header Host '$SOUNDBASE_HOST';
|
|
|
|
proxy_redirect http://$SOUNDBASE_HOST https://$JC_SERVICE;
|
|
|
|
# wait
|
|
|
|
client_max_body_size 0;
|
|
|
|
proxy_connect_timeout 6000;
|
|
|
|
proxy_send_timeout 60000;
|
|
|
|
proxy_read_timeout 6000;
|
|
|
|
send_timeout 6000;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2024-01-02 16:50:14 +00:00
|
|
|
|
2024-10-16 09:41:44 +00:00
|
|
|
location /pige {
|
|
|
|
alias "$SOUNDBASE_DIR/pige";
|
|
|
|
try_files $uri $uri/ =404;
|
2023-10-16 08:47:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
location /direct.ogg {
|
|
|
|
client_max_body_size 0;
|
|
|
|
proxy_pass http://$NET$ICECAST:8000/direct.ogg;
|
2024-10-16 09:41:44 +00:00
|
|
|
# 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;
|
2023-10-16 08:47:35 +00:00
|
|
|
}
|
|
|
|
location /direct.mp3 {
|
|
|
|
client_max_body_size 0;
|
|
|
|
proxy_pass http://$NET$ICECAST:8000/direct.mp3;
|
2024-10-16 09:41:44 +00:00
|
|
|
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
2023-10-16 08:47:35 +00:00
|
|
|
}
|
2024-10-16 09:41:44 +00:00
|
|
|
location /style.css {
|
|
|
|
client_max_body_size 0;
|
|
|
|
proxy_pass http://$NET$ICECAST:8000/style.css;
|
2024-01-02 16:50:14 +00:00
|
|
|
}
|
2024-10-16 09:41:44 +00:00
|
|
|
location /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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
location ~ /muxapi(/.*) {
|
|
|
|
auth_basic "Entrez votre identifiant et mot de passe";
|
|
|
|
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
|
|
|
|
include uwsgi_params;
|
|
|
|
uwsgi_param PATH_INFO "$1";
|
|
|
|
uwsgi_param SCRIPT_NAME /muxapi;
|
|
|
|
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';
|
|
|
|
if_modified_since off;
|
|
|
|
expires off;
|
|
|
|
etag off;
|
|
|
|
}
|
2023-10-16 08:47:35 +00:00
|
|
|
}
|