Created
October 25, 2016 01:26
-
-
Save jotebe/fa178aa36df33c14de5cdd758e1bc6e1 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
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
#force webmail.example to use ssl | |
server { | |
listen 80; | |
server_name webmail.example.org; | |
return 301 https://webmail.example.org$request_uri; | |
} | |
#webmail.example main entry | |
server { | |
listen 443 ssl; | |
server_name webmail.example.org; | |
ssl_certificate /opt/certs/webmail.example.org.crt; | |
ssl_certificate_key /opt/certs/webmail.example.org.key; | |
location / { | |
proxy_pass http://internalhost1:81/; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} | |
#Calibre server | |
server { | |
listen 80; | |
server_name b.example.org; | |
location / { | |
proxy_pass http://internalhost1:8080/; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} | |
#force wiki.example to use ssl | |
server { | |
listen 80; | |
server_name wiki.example.org; | |
return 301 https://wiki.example.org$request_uri; | |
} | |
#wiki.example main entry | |
server { | |
listen 443 ssl; | |
server_name wiki.example.org; | |
ssl_certificate /opt/certs/wiki.example.org.crt; | |
ssl_certificate_key /opt/certs/wiki.example.org.key; | |
location / { | |
proxy_pass http://internalhost1:8090/; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} | |
#Plex server | |
server { | |
listen 80; | |
server_name p.example.org; | |
location / { | |
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_redirect off; | |
proxy_pass http://internalhost2:32400; | |
} | |
} | |
#Minecraft Overviewer map | |
server { | |
listen 80; | |
server_name mc.example.org; | |
location / { | |
proxy_pass http://internalhost3:25566/; | |
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