Skip to content

work behind nginx ssl proxy #80

@bluenevus

Description

@bluenevus

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions