Skip to content

Instantly share code, notes, and snippets.

@baumandm
Created November 29, 2016 06:20
Show Gist options
  • Save baumandm/64e69c6660abe4f369b83d2664b377f5 to your computer and use it in GitHub Desktop.
Save baumandm/64e69c6660abe4f369b83d2664b377f5 to your computer and use it in GitHub Desktop.
Koken / Ghost Nginx Subdomains
server {
listen 80 default_server;
server_name www.davebauman.io davebauman.io;
location / {
proxy_pass http://localhost:8080;
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-Proto $scheme;
client_max_body_size 0;
}
}
server {
listen 80;
server_name blog.davebauman.io;
location / {
proxy_pass http://localhost:8081;
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-Proto $scheme;
client_max_body_size 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment