Skip to content

Commit f7ef6fb

Browse files
authored
[Documentation:System] Added documentation for configuring custom websocket port in NGINX (#651)
### Summary: - Added a new section under NGINX configuration to explain how to set up a custom websocket port. - Included steps to modify the `submitty.json` file and update the `proxy_pass` directive in the NGINX configuration. - Clarified default behavior if the `websocket_port` field is not set. ### Why this change is needed: - Previously, the documentation lacked details for configuring custom websocket ports after #6814 was merged. - An issue was created on [here](Submitty/Submitty#6813). Fixes #6813 - Helps users avoid conflicts when running multiple instances or using different environments. ### Changes made: - Added a new "Configure Websocket Port" section to the NGINX setup documentation. - Provided clear step-by-step instructions and examples. ### Testing: - Documentation changes only, no code changes. - Verified formatting and clarity.
1 parent 728470a commit f7ef6fb

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

_docs/sysadmin/installation/index.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,38 @@ You can use these [instructions](/sysadmin/installation/ansible).
196196
cp submitty.cer submitty.pem
197197
cat chain.cer >> submitty.pem
198198
```
199+
#### Configure Websocket Port
200+
201+
Submitty allows you to configure the websocket server to use a custom port. To do this:
202+
203+
Open the Submitty configuration file:
204+
205+
bash
206+
/usr/local/submitty/config/submitty.json```
207+
208+
Add or modify the websocket_port field, for example:
209+
210+
"websocket_port": 9001
211+
```
212+
The websocket server will default to port 8443 if this value is not set.
213+
Update the proxy_pass directive in your NGINX configuration
214+
```(/etc/nginx/sites-available/submitty.conf)``` to match the new port:
215+
```
216+
location /ws {
217+
proxy_pass http://127.0.0.1:9001; # Updated port here
218+
proxy_http_version 1.1;
219+
proxy_set_header Upgrade $http_upgrade;
220+
proxy_set_header Connection "Upgrade";
221+
proxy_set_header Host $host;
222+
}
223+
```
224+
225+
Restart NGINX for the changes to take effect:
226+
227+
```
228+
sudo systemctl restart nginx
229+
```
230+
199231
200232
7. We recommend that you should leave the PostgreSQL setup unless you know what
201233
you're doing. If you are running PostgreSQL on the same server as Submitty,

0 commit comments

Comments
 (0)