diff --git a/README.md b/README.md index ad77175..2f577b7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/README.rst b/README.rst index f435d15..c7fb9b5 100644 --- a/README.rst +++ b/README.rst @@ -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