Created
May 13, 2021 14:51
-
-
Save johncrisp/fc3706cb8d5b2aafb24e84e2e63770f8 to your computer and use it in GitHub Desktop.
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
upstream backend { | |
server 127.0.0.1:3000; | |
} | |
# HTTPS Server | |
server { | |
listen external.ip.address ssl http2; | |
server_name chat.myserver.com | |
# You can increase the limit if your need to. | |
client_max_body_size 200M; | |
access_log /var/log/nginx/rocketchat.access.log; | |
error_log /var/log/nginx/rocketchat.error.log; | |
ssl on; | |
#ssl_certificate /etc/nginx/certificate.crt; | |
#ssl_certificate_key /etc/nginx/certificate.key; | |
ssl_certificate /etc/dehydrated/certs/myserver.com/fullchain.pem; | |
ssl_certificate_key /etc/dehydrated/certs/myserver.com/privkey.pem; | |
ssl_trusted_certificate /etc/dehydrated/certs/myserver.com/chain.pem; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE | |
location / { | |
proxy_pass http://backend/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forward-Proto http; | |
proxy_set_header X-Nginx-Proxy true; | |
proxy_redirect off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment