Comments (6)
Thanks for that link, that must have been it!
Changing proxy_pass http://[::1]:7000$uri;
in the relevant nginx config to proxy_pass http://[::1]:7000;
seems to have fixed the problem!
Closing this as resolved.
from znc.
Is there another place ZNC logs to that I can find out more?
Depends on how exactly you run ZNC, but in general, running with --debug
provides some output.
When trying to add or edit networks through the WebUI I get redirected to this 404 page:
Could you say something about the URL that your browser displays when you get this 404 page? I don't want to know the (possibly private) location of your web interface, but the relative URL for that. Specifically, which module are you accessing?
For example, if your browser were to display https://znc.in/foo/bar
, I'd be interested in the /foo/bar
part of this.
Another quick idea: What do the nginx logs say for this request? Perhaps there is something helpful in its access logs.
from znc.
I have provided the relevant part of my nginx log below. As you can see, the URL its trying to access is /mods/global/webadmin/addnetwork, but the same thing happens for editnetwork and delnetwork.
2003:d4:****:****:****:****:****:****- - [26/Apr/2024:09:35:34 +0000] "GET /mods/global/webadmin/addnetwork?user=*** HTTP/2.0" 404 269 "https://znc.***.***/mods/global/webadmin>
from znc.
Well... okay, I don't know what is going and would be interested in hints from znc --debug
.
2003:d4:****:****:****:****:****:****- - [26/Apr/2024:09:35:34 +0000] "GET /mods/global/webadmin/addnetwork?user=*** HTTP/2.0" 404 269 "https://znc.***.***/mods/global/webadmin>
How do I have to read this? nginx got a request for /mods/global/webadmin/addnetwork?user=***
, I guess. But the /mods/global/webadmin
at the end confuses me.
Looking at the code, The requested module does not acknowledge web requests
comes from here:
Line 893 in 82e82f0
This code is reached if a module "does nothing" in its
OnWebRequest
hook. The default implementation does nothing, but the implementation from webadmin
definitely should do something: Lines 519 to 736 in 82e82f0
Well... unless you are accessing a page it does not understand. All the return false
s here could reach the code path you are seeing. Most of them are admin checks ("A non-admin is trying to do something that only admins may do"). I will assume that this is not the case for you.
Anyway, for your addnetwork
case, this is the relevant code:
Lines 537 to 556 in 82e82f0
The Admin or self change
-check could produce the error message you are seeing. Besides that, I don't see anything that could cause this (all the other paths should display an error message), but I might be missing something. This might also be a problem with the HTTP session getting lost.
Does the webadmin web page still shows your login name after clicking around a bit? The session magic uses cookies and that should still work behind a proxy. But perhaps "something" is going on with your proxy. Did you configure TrustedProxies
?
Anyway, now I would be more interested in output from znc --debug
when doing such a request.
from znc.
There is something weird going on with the webadmin
for sure. The error happens when I'm trying to do changes on my own account, so while that one isn't an admin, it should still be allowed.
In fact, a different kind of silent error happens when trying to do stuff as admin from the webadmin interface. When trying to edit other accounts, I instead get redirected to the admin page instead. It shows /mods/global/webadmin/edituser?user=normalusername
in the URL, but I'm clearly on the /mods/global/webadmin/edituser?user=admin
page instead.
I have
TrustedProxy = 127.0.0.1
TrustedProxy = ::1
in my znc.conf.
I'll come back with znc --debug
output later / tomorrow.
from znc.
Could it be that the ?user=foo
part gets lost between the proxy and znc?
I don't really understand it, but Google sounds like this is a not-unusual problem: https://serverfault.com/questions/656380/nginx-proxy-pass-with-uri-modification
from znc.
Related Issues (20)
- Problem with rejoin after kick
- znc+fish won't encrypt own messages
- Add OpenID Connect support HOT 3
- Add some way to bypass channel mode cache (or just remove it) HOT 6
- Feature request: ability to disable the "The channel could not be joined, disabling it" behavior HOT 1
- Client connecton stalled after CAP ACK HOT 3
- Portainer Add Template > ZNC - no login
- Add Security Headers to webadmin HOT 5
- Cannot load python modules via webadmin w/ Debian 12/Python 3.11.x/znc-1.9.x HOT 2
- can't remove some channels from chansaver HOT 5
- Reconnecting too fast HOT 6
- Missing `RPL_TOPICWHOTIME` from server results in incorrect `RPL_TOPICWHOTIME` sent to client
- Update the Copyright notice
- Perform /timer unknown command HOT 3
- Watch module ZNC HOT 7
- Missing : in PASS command
- Likely race condition in build system related to `generated.tar.gz` HOT 3
- identd and identfile doeset works HOT 10
- Expired Certificate for wiki.znc.in HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from znc.