Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple NGINX forwarding
upstream discourse {
#fail_timeout is optional; I throw it in to see errors quickly
server fail_timeout=5;
# configure the virtual host
server {
# replace with your domain name
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