save
This commit is contained in:
parent
b3dba4542f
commit
0c98334d1c
9 changed files with 151 additions and 0 deletions
29
recipes/nginx/proxy.erb
Normal file
29
recipes/nginx/proxy.erb
Normal file
|
@ -0,0 +1,29 @@
|
|||
server {
|
||||
root /home/<%= service %>/;
|
||||
|
||||
index index.html index.htm;
|
||||
server_name <%= domain %>;
|
||||
listen [::]:443 ssl ipv6only=on;
|
||||
listen 443 ssl;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:<%= port %>;
|
||||
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 Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/<%= domain %>/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/<%= domain %>/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue