2020-02-12 16:18:43 +00:00
|
|
|
server {
|
2020-02-17 16:33:47 +00:00
|
|
|
resolver 127.0.0.11 valid=30s;
|
|
|
|
|
2020-02-12 16:18:43 +00:00
|
|
|
server_name ${APP_HOST};
|
|
|
|
|
|
|
|
location / {
|
2020-02-17 16:33:47 +00:00
|
|
|
#Using variable to disable start checks
|
|
|
|
set $app http://app;
|
|
|
|
|
|
|
|
proxy_pass $app;
|
2020-02-12 16:18:43 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
|
|
}
|
|
|
|
|
|
|
|
error_log /var/log/nginx/app-error.log;
|
|
|
|
access_log /var/log/nginx/app-access.log;
|
|
|
|
|
|
|
|
listen 443 ssl;
|
|
|
|
ssl_certificate /cert/fullchain.pem;
|
|
|
|
ssl_certificate_key /cert/privkey.pem;
|
|
|
|
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
|
|
|
|
listen 80;
|
|
|
|
server_name ${APP_HOST};
|
|
|
|
return 301 https://$server_name$request_uri;
|
|
|
|
}
|
|
|
|
|