Last active
March 15, 2016 11:20
-
-
Save bryceadams/f9eae565d602478781aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 443 ssl; | |
| listen [::]:443 ssl; | |
| server_name | |
| www.mysite.com | |
| mysite.com | |
| ; | |
| ssl on; | |
| ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem; | |
| root /srv/users/serverpilot/apps/mysite/public; | |
| access_log /srv/users/serverpilot/log/mysite/mysite_nginx.access.log main; | |
| error_log /srv/users/serverpilot/log/mysite/mysite_nginx.error.log; | |
| 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-SSL on; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| include /etc/nginx-sp/vhosts.d/mysite.d/*.nonssl_conf; | |
| include /etc/nginx-sp/vhosts.d/mysite.d/*.conf; | |
| } |
The lines @samazgor noticed are very important, I forgot them, and I didn't see it was mysite.d so I didn't change it to my own domain. This took me hours because of the 403 error message XD. Please change this in your blog!
Author
Terribly sorry, must have missed it when I copied. Thanks @samazgor! :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
two more lines need to be added at the bottom