jean-cloud-services/services/mux.radiodemo.oma-radio.fr/nginx_server.conf
2024-01-02 17:50:14 +01:00

53 lines
1.3 KiB
Plaintext

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;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name $JC_SERVICE;
ssl_certificate $JC_CERT/fullchain.pem;
ssl_certificate_key $JC_CERT/privkey.pem;
location / {
client_max_body_size 0;
proxy_pass http://$ENDPOINT/;
proxy_set_header Host 'soundbase.radiodemo.oma-radio.fr';
proxy_redirect http://soundbase.radiodemo.oma-radio.fr https://$JC_SERVICE;
}
location /direct.ogg {
client_max_body_size 0;
proxy_pass http://$NET$ICECAST:8000/direct.ogg;
}
location /direct.mp3 {
client_max_body_size 0;
proxy_pass http://$NET$ICECAST:8000/direct.mp3;
}
location /logs/ {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $DOCKER_DIR/server.sh;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
}