Could someone give me a bit of insight on this? I'm trying to set up a remote connection to my ZNC IRC bouncer using nginx, so that I can access my bouncer from work. I have ZNC running as a container on unRAID. This is what I have in my nginx config file (znc.subdomain.conf):
## Version 2021/05/18
# make sure that your dns has a cname set for znc
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name irc.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
proxy_pass http://192.168.1.2:6502;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
My ZNC config file has the following set up for listeners, nothing else in that config file should really matter:
<Listener listener0>
AllowIRC = false
AllowWeb = true
IPv4 = true
IPv6 = false
Port = 6501
SSL = false
URIPrefix = /
</Listener>
<Listener listener1>
AllowIRC = true
AllowWeb = false
IPv4 = true
IPv6 = false
Port = 6502
SSL = false
URIPrefix = /
</Listener>
With this setup I keep getting the following error message on my IRC client whenever I try to connect to my subdomain using the port 443:
HTTP/1.1 400 Bad Request
Server: nginx
Date: Tue, 17 Aug 2021 18:36:52 GMT
Content-Type: text/html
Content-Length: 150
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
Using the same swag container I've managed to set up remote access for my Plex server using another one of my subdomains.