Skip to content

Instantly share code, notes, and snippets.

@d3zorg
Forked from trident523/discourse.conf
Last active August 29, 2015 14:16
Show Gist options
  • Save d3zorg/724ae8e7183a5901259c to your computer and use it in GitHub Desktop.
Save d3zorg/724ae8e7183a5901259c to your computer and use it in GitHub Desktop.
upstream discourse {
#fail_timeout is optional; I throw it in to see errors quickly
server 127.0.0.1:4578 fail_timeout=5;
}
# configure the virtual host
server {
# replace with your domain name
server_name discourse.example.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
# pass to the upstream discourse server mentioned above
proxy_pass http://discourse;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment