mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #2590] Mediawiki behind NPM behaving inconsistently #1806
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1806
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Encephala on GitHub (Feb 5, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2590
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
I'm trying to proxy a Mediawiki instance in rootless Podman through the official Mediawiki Docker image. I've imported an existing (non-Docker) Mediawiki instance into it. Nginx Proxy Manager is running as on the same machine, in the same network.
If I connect bypassing the proxy it works perfectly fine. However if access it through NPM, I get weird behaviour. I've configured Mediawiki through the $wgServer setting to generate proper redirect URLs in either scenario.
The page loads, but some parts of it won't. Which parts won't load is highly inconsistent; sometimes chrome leaves a blank grey page, sometimes the whole page loads but breaks as soon as I click a link, sometimes the side navbar doesn't load, etc. The Mediawiki instance just reports HTTP 200 codes, so it is not rejecting anything. Nginx on the other hand reports a ton of "[crit] connect() [...] failed (22: Invalid argument)", accompanied by a lot of "[warn] upstream server temporarily disabled while connecting to upstream" and "[error] upstream prematurely closed connection while reading upstream".
I'm running a wikijs instance in the exact same setup; rootless wiki container in the same network as NPM, which is proxying it. This works perfectly fine. I have no custom configuration in NPM and have ensured that the issue isn't to do with the firewalls; after running iptables -F it still happens.
I've tried proxying to the docker dns name and internal port, as well as publishing the Mediawiki's port to the host and proxying to the external hostname and port. The exact same issue occurs in both cases.
Nginx Proxy Manager Version
It says v2.9.19 (sidenote: it says this when pulling tag "v3" from Dockerhub).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The mediawiki instance is proxied properly.
Screenshots
Operating System
The host is running Ubuntu 22.04 on a cloud-rented VPS.
Additional context
Podman version 3.4.4
Mediawiki version 1.3.5
@Encephala commented on GitHub (Feb 19, 2023):
Not sure if the issue is with Nginx Proxy Manager. Closing issue for now.
@Encephala commented on GitHub (May 9, 2023):
For anyone who happens to stumble upon this later, the problem was with the Mediawiki container not working well with
proxy_http_version 1.1;, which is set by default in Nginx Proxy Manager.The solution is to manually set
proxy_http_version 1.0;in the advanced config of your proxy host. Note that to do this, websockets must be disabled! Enabling websockets and having this in the advanced config leads to bothproxy_http_version 1.0;andproxy_http_version 1.1;to be set in the config, which Nginx doesn't accept and thus the host will be down due to the bad config.