# 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 443 ssl; listen [::]:443 ssl; server_name $JC_SERVICE; ssl_certificate $JC_CERT/fullchain.pem; ssl_certificate_key $JC_CERT/privkey.pem; <<<<<<< HEAD root $SOUNDBASE_DIR; index index.html; auth_basic "Entrez votre identifiant et mot de passe"; auth_basic_user_file $SOUNDBASE_DIR/users.htpasswd; location /soundbase { alias "$DATA_DIR/soundbase"; try_files $uri $uri/ =404; } location / { root "$DATA_DIR/soundbase/website"; try_files $uri $uri/ =404; } ======= auth_basic "Entrez votre identifiant et mot de passe"; auth_basic_user_file $DATA_DIR/soundbase/users.htpasswd; location /soundbase/fic { alias $DATA_DIR/soundbase/fic; index index.html; # 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 /soundbase { alias $DATA_DIR/soundbase; index index.html; } location /buildwebsite/ { fastcgi_param SCRIPT_FILENAME $DOCKER_DIR/server.sh; fastcgi_pass unix:/var/run/fcgiwrap.socket; } >>>>>>> 9f3b59b (next step) location ~ /api(/.*) { 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'; if_modified_since off; expires off; etag off; } <<<<<<< HEAD ======= # Admin interface location /manager { alias $DATA_DIR/soundbase/manager; try_files $uri $uri/ =404; } >>>>>>> 9f3b59b (next step) }