add nginx proxy

This commit is contained in:
Yann Autissier
2022-12-10 17:58:25 +00:00
parent 92dcf23fdd
commit 1d1b5156bc
52 changed files with 442 additions and 173 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -eu
##
# CONFIG
sed -i 's/fastcgi_param * SERVER_SOFTWARE *.*/fastcgi_param SERVER_SOFTWARE nginx;/' /etc/nginx/fastcgi_params
##
# DEFAULT
mkdir -p /etc/nginx/htpasswd /etc/nginx/vhost.d
[ -f "/etc/nginx/htpasswd/default" ] || echo "default:{PLAIN}$(head -c 15 /dev/random |base64)" > /etc/nginx/htpasswd/default
[ -f "/etc/nginx/vhost.d/default" ] || cp /app/nginx_default /etc/nginx/vhost.d/default
[ -f "/etc/nginx/vhost.d/default_location" ] || cp /app/nginx_default_location /etc/nginx/vhost.d/default_location