add scripts to create nginx virtual host for service

This commit is contained in:
2020-12-20 20:18:29 -06:00
parent ef2564ed53
commit b794c5e8a9
2 changed files with 53 additions and 0 deletions

27
nginx.conf.template Normal file
View File

@@ -0,0 +1,27 @@
server {
listen 80;
listen [::]:80;
server_name @SERVER_NAME@;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
client_max_body_size 100G;
server_name @SERVER_NAME@;
access_log /var/log/nginx/@SERVER_NAME@/access.log;
error_log /var/log/nginx/@SERVER_NAME@/error.log;
location /.well-known/ {
root /var/www/html/;
try_files $uri $uri/ =404;
}
location / {
proxy_pass http://127.0.0.1:@PORT@/;
}
}