Created
July 7, 2020 04:01
-
-
Save wwj718/b94aee93b8524e5bc2f0cc433acaf8b9 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
server { | |
listen 80; listen [::]:80; | |
server_name forums.codelab.club; # <-- change this | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl http2; listen [::]:443 ssl http2; | |
server_name forums.codelab.club; # <-- change this | |
ssl on; | |
ssl_certificate /home/wwj/.acme.sh/codelab.club/fullchain.cer; | |
ssl_certificate_key /home/wwj/.acme.sh/codelab.club/codelab.club.key; | |
ssl_trusted_certificate /home/wwj/.acme.sh/codelab.club/ca.cer; | |
http2_idle_timeout 5m; # up from 3m default | |
location / { | |
proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:; | |
proxy_set_header Host $http_host; | |
proxy_http_version 1.1; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment