Created
January 27, 2014 05:40
-
-
Save jonalvarezz/8643731 to your computer and use it in GitHub Desktop.
Nginx as frontend proxy for Ghost
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 { | |
server_name www.sitedomain.com; | |
rewrite ^ http://sitedomain.com$request_uri? permanent; | |
} | |
server { | |
listen 0.0.0.0:80; | |
server_name sitedomain.com; | |
access_log /var/log/nginx/sitedomain.log; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header HOST $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
# Ghost IP and port. see ghost config.js | |
proxy_pass http://127.0.0.1:3000; | |
proxy_redirect off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment