diff options
Diffstat (limited to 'template/nginx/reverse-proxy.conf.template')
| -rw-r--r-- | template/nginx/reverse-proxy.conf.template | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/template/nginx/reverse-proxy.conf.template b/template/nginx/reverse-proxy.conf.template new file mode 100644 index 0000000..e98c066 --- /dev/null +++ b/template/nginx/reverse-proxy.conf.template @@ -0,0 +1,23 @@ +upstream ${CRUPEST_NGINX_UPSTREAM_NAME} { +    server ${CRUPEST_NGINX_UPSTREAM_SERVER}; +} + +server { +    listen 443 ssl http2; +    listen [::]:443 ssl http2; +    server_name ${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN}; + +    ssl_certificate /etc/letsencrypt/live/${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN}/fullchain.pem; +    ssl_certificate_key /etc/letsencrypt/live/${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN}/privkey.pem; + +    location / { +        proxy_pass http://${CRUPEST_NGINX_UPSTREAM_NAME}; +        proxy_http_version 1.1; +        proxy_set_header Upgrade $http_upgrade; +        proxy_set_header Connection $http_connection; +        proxy_set_header Host $host; +        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +        proxy_set_header X-Forwarded-Proto $scheme; +        proxy_set_header X-Real-IP $remote_addr; +    } +}  | 
