-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to cloudflare and disable self managed https
- Loading branch information
Showing
2 changed files
with
43 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,21 @@ | ||
server { | ||
listen 80; | ||
server_name ${DOMAIN_NAME}; | ||
|
||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name ${DOMAIN_NAME}; | ||
error_log /var/log/nginx/burrito.error.log; | ||
client_max_body_size 4G; | ||
|
||
# error_log /var/log/nginx/burrito.error.log; | ||
|
||
ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem; | ||
|
||
ssl_session_timeout 5m; | ||
ssl_session_tickets off; | ||
ssl_protocols TLSv1.2 TLSv1.3; | ||
ssl_prefer_server_ciphers off; | ||
ssl_ciphers 'HIGH:!aNULL:!MD5'; | ||
ssl_session_cache shared:le_nginx_SSL:10m; | ||
|
||
location / { | ||
proxy_pass http://burrito_server:6969; | ||
proxy_http_version 1.1; | ||
proxy_read_timeout 360s; | ||
proxy_buffering off; | ||
proxy_redirect off; | ||
|
||
add_header Cache-Control "no-cache, must-revalidate"; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
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 https; | ||
proxy_set_header X-Forwarded-Proto http; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
server { | ||
listen 80; | ||
server_name ${DOMAIN_NAME}; | ||
|
||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name ${DOMAIN_NAME}; | ||
client_max_body_size 4G; | ||
|
||
# error_log /var/log/nginx/burrito.error.log; | ||
|
||
ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem; | ||
|
||
ssl_session_timeout 5m; | ||
ssl_session_tickets off; | ||
ssl_protocols TLSv1.2 TLSv1.3; | ||
ssl_prefer_server_ciphers off; | ||
ssl_ciphers 'HIGH:!aNULL:!MD5'; | ||
ssl_session_cache shared:le_nginx_SSL:10m; | ||
|
||
location / { | ||
proxy_pass http://burrito_server:6969; | ||
proxy_http_version 1.1; | ||
proxy_read_timeout 360s; | ||
proxy_buffering off; | ||
proxy_redirect off; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
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 https; | ||
} | ||
} |