save
This commit is contained in:
parent
76bd8f782d
commit
f7d2665d4f
6 changed files with 27 additions and 11 deletions
5
lib/data/templates/nginx/default.erb
Normal file
5
lib/data/templates/nginx/default.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
29
lib/data/templates/nginx/proxy.erb
Normal file
29
lib/data/templates/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