Last active
December 29, 2015 06:29
-
-
Save venantius/7629867 to your computer and use it in GitHub Desktop.
This is how to set up a subdomain reverse proxy
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; | |
server_name blog.venanti.us; | |
location / { | |
proxy_pass http://85.17.164.147:2368; | |
# This should be changed in the future to send to 127.0.01 | |
# but for now Ghost isn't configured for that | |
} | |
} | |
#FWIW I cannot for the life of me figure out how to make this work on venanti.us/blog instead of blog.venanti.us, so bah humbug. | |
#I think, though, that if one were to do such a thing, it would look vaguely like this: | |
# After further poking around, it seems Ghost simply doesn't support doing this. There are hacky ways to make it work, but none of them look particularly good. | |
server { | |
listen 80; | |
server_name venanti.us; | |
location / { | |
# Some stuff goes here eventually | |
} | |
location /blog/ { | |
include /etc/nginx/mime.types; | |
rewrite ^/blog(/.*)$ $1 break; | |
proxy_pass http://85.17.164.147:2368; | |
# This should be changed in the future to send to 127.0.01 | |
# but for now Ghost isn't configured for that | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment