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

Allow hosting at a subfolder #61

Merged
merged 1 commit into from
Sep 21, 2015
Merged

Allow hosting at a subfolder #61

merged 1 commit into from
Sep 21, 2015

Conversation

Graham42
Copy link
Contributor

To host at mydomain.com/getslack, can't use absolute urls. Also,
socket.io needs to be initialized with the proper path.

Sample nginx config to host in a subfolder:

location /getslack/ {
    proxy_pass http://localhost:3000/;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # upgrade needed for websocket connection
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

To host at mydomain.com/getslack, can't use absolute urls. Also,
socket.io needs to be initialized with the proper path.

Sample nginx config to host in a subfolder:

```
location /getslack/ {
    proxy_pass http://localhost:3000/;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # upgrade needed for websocket connection
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}
```
rauchg added a commit that referenced this pull request Sep 21, 2015
@rauchg rauchg merged commit 0b7da63 into rauchg:master Sep 21, 2015
@rauchg
Copy link
Owner

rauchg commented Sep 21, 2015

Thanks! Clean approach

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

Successfully merging this pull request may close these issues.

2 participants