Skip to content

Commit

Permalink
add example config for nginx subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
ssb22 committed Oct 29, 2022
1 parent 4aec063 commit 5cd85f7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
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

0 comments on commit 5cd85f7

Please sign in to comment.