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

add example config for nginx subdirectory #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,23 @@ location / {
}
```

If the Nginx server is also serving a website,
you can have it put WebSSH into a subdirectory:

```nginx
location = /webssh {
return 302 /webssh/;
}
location /webssh/ws {
proxy_pass http://127.0.0.1:8888/ws;
proxy_http_version 1.1;
# ... (rest as above)
}
location /webssh/ {
proxy_pass http://127.0.0.1:8888/;
}
```

Running as a standalone server
```bash
wssh --port=8080 --sslport=4433 --certfile='cert.crt' --keyfile='cert.key' --xheaders=False --policy=reject
Expand Down
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,23 @@ Running behind an Nginx server
proxy_set_header X-Real-PORT $remote_port;
}

If the Nginx server is also serving a website,
you can have it put WebSSH into a subdirectory:

.. code:: nginx

location = /webssh {
return 302 /webssh/;
}
location /webssh/ws {
proxy_pass http://127.0.0.1:8888/ws;
proxy_http_version 1.1;
# ... (rest as above)
}
location /webssh/ {
proxy_pass http://127.0.0.1:8888/;
}

Running as a standalone server

.. code:: bash
Expand Down