jean-cloud-services/services/soundbase.radiodemo.oma-radio.fr/nginx_server.conf

123 lines
3.5 KiB
Plaintext
Raw Normal View History

2023-06-01 13:26:12 +00:00
# Parameters:
# radio name
# file path
# ws port (local)
# wss port (open)
# upload service port
# ssl certs location
# TODO
# /speedtest-down returns random data
# can use : openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero > randomfile.bin
# /speedtest-up just eat everything it can
server {
listen 80;
listen [::]:80;
2023-09-13 08:46:02 +00:00
server_name $JC_SERVICE;
2023-06-01 13:26:12 +00:00
root $SOUNDBASE_DIR/website;
index index.html;
2024-01-02 16:50:14 +00:00
location ~ /api(/.*) {
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
2023-06-01 13:26:12 +00:00
include uwsgi_params;
2024-01-02 16:50:14 +00:00
uwsgi_param PATH_INFO "$1";
2023-06-01 13:26:12 +00:00
uwsgi_param SCRIPT_NAME /api;
2023-09-13 08:46:02 +00:00
uwsgi_pass unix:/tmp/uwsgi/$JC_SERVICE/uwsgi-api.sock;
2023-06-01 13:26:12 +00:00
client_max_body_size 0;
2024-01-02 16:50:14 +00:00
proxy_connect_timeout 6000;
proxy_send_timeout 60000;
proxy_read_timeout 6000;
2023-06-01 13:26:12 +00:00
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;
}
location /pige{
alias $SOUNDBASE_DIR/pige;
try_files $uri $uri/ =404;
}
location /png {
alias $SOUNDBASE_DIR/png;
try_files $uri $uri/ =404;
}
location /webpL {
alias $SOUNDBASE_DIR/webpL;
try_files $uri $uri/ =404;
}
location /webpH {
alias $SOUNDBASE_DIR/webpH;
try_files $uri $uri/ =404;
}
location /ogg {
alias $SOUNDBASE_DIR/ogg;
try_files $uri $uri/ =404;
}
location /txt {
alias $SOUNDBASE_DIR/txt;
try_files $uri $uri/ =404;
}
location /wavM {
2024-01-02 16:50:14 +00:00
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
2023-06-01 13:26:12 +00:00
alias $SOUNDBASE_DIR/wavM;
try_files $uri $uri/ =404;
}
location /import {
2024-01-02 16:50:14 +00:00
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
2023-06-01 13:26:12 +00:00
alias $SOUNDBASE_DIR/import;
try_files $uri $uri/ =404;
}
location /export {
2024-01-02 16:50:14 +00:00
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
2023-06-01 13:26:12 +00:00
alias $SOUNDBASE_DIR/export;
try_files $uri $uri/ =404;
}
location /wav {
2024-01-02 16:50:14 +00:00
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
2023-06-01 13:26:12 +00:00
alias $SOUNDBASE_DIR/wav;
try_files $uri $uri/ =404;
}
2024-01-02 16:50:14 +00:00
location /fic {
alias $SOUNDBASE_DIR/fic;
2023-06-01 13:26:12 +00:00
try_files $uri $uri/ =404;
}
location /prg {
2024-01-02 16:50:14 +00:00
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
2023-06-01 13:26:12 +00:00
alias $SOUNDBASE_DIR/prg;
try_files $uri $uri/ =404;
}
2024-01-02 16:50:14 +00:00
location /lst {
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
alias $SOUNDBASE_DIR/lst;
2023-06-01 13:26:12 +00:00
try_files $uri $uri/ =404;
}
location /statique {
alias $SOUNDBASE_DIR/statique;
try_files $uri $uri/ =404;
}
# Admin interface
location /manager {
2024-06-15 15:59:53 +00:00
alias $HTTP_DIR/manager/dist;
2023-06-01 13:26:12 +00:00
auth_basic "Entrez votre identifiant et mot de passe";
auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd;
try_files $uri $uri/ =404;
}
}