Last active
February 22, 2020 14:44
-
-
Save herkom-o-matic/6906ee63706eab03c272f28076d20ae8 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
#you should not name the file with any extension, just "booksonic" or whatever | |
server { | |
listen 80; | |
server_name your-domain.com; //change this | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name your-domain.com; //change this | |
ssl_certificate /route-to-your-certificate-file; //change this | |
ssl_certificate_key /route-to-your-certificate-keyfile; //change this | |
location / { | |
proxy_bind $server_addr; | |
proxy_pass http://127.0.0.1:4040; //use your server port, BUT the address should be your PRIVATE address | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Scheme $scheme; | |
proxy_set_header X-Script-Name /booksonic; | |
proxy_redirect http:// https://; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment