Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work behind nginx ssl proxy #80

Open
bluenevus opened this issue Apr 12, 2015 · 0 comments
Open

work behind nginx ssl proxy #80

bluenevus opened this issue Apr 12, 2015 · 0 comments

Comments

@bluenevus
Copy link

I simply can't get it to work behind nginx ssl proxy. 1st I updated Sharefest so it works on the newest express. I'm happy to share that with everyone. I updated server.js with app.enable('trust proxy'); so that it can get the ip and connection from the client which it does. here is the nginx file...there is something I'm missing and I think its something in express from the server.js file but can't figure it out. Any help would be grateful.

----nginx setting
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
# be carefull, this line doesn't override any proxy_buffering on set in a$
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr; # http://wiki.nginx.org/HttpPro$

        proxy_http_version 1.1;  # recommended with keepalive connections
        # WebSocket proxying - from http://nginx.org/en/docs/http/websocket.html
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;

    }

}

we're in the http context here

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant