Moving KiwiIRC websocket behind Nginx instead of dedicated external port

This commit is contained in:
2025-10-21 15:31:32 -05:00
parent 571455802b
commit 31992aa487
5 changed files with 62 additions and 58 deletions

View File

@@ -3,7 +3,6 @@ server {
server_name irc.aninix.net;
include conf/sec.conf;
include conf/local.conf;
include conf/default.csp.conf;
include conf/letsencrypt.conf;
@@ -13,4 +12,22 @@ server {
autoindex on;
autoindex_format html;
}
location /websocket/ {
proxy_pass http://unix:/run/inspircd/websocket.sock;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Original-Host $host;
proxy_set_header X-Original-Protocol $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
}
}