mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #668] Need help with proxying cockpit #562
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#562
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 @bayeslearnerold on GitHub (Oct 20, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/668
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
This is not a bug but request for guidance with proxying cockpit.
I'm able to proxy many services but not cockpit.
I tried to follow this guide here without success:
https://github.com/cockpit-project/cockpit/wiki/Proxying-Cockpit-over-NGINX
The result is either SSL or login loop or upon login, an error from cockpit
What exactly do I need to do when I use cockpit with nginx-proxy-manager.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Operating System
Additional context
Add any other context about the problem here, docker version, browser version if applicable to the problem. Too much info is better than too little.
@jc21 commented on GitHub (Oct 20, 2020):
Cockpit works easily for me. Just make sure that the protocol is https. Here's my config:
I also have NPM generate a certificate for this host.
@bayeslearnerold commented on GitHub (Oct 20, 2020):
I had similar settings, did you make any changes to cockpit conf?
The first symptom is that
With the settings (https xxx.xxx.xxx 9090) I can't login to cockpit. It redirects back to the home page.
Now after tweaking cockpit conf according to their documentation, I can't even get the home page to load.
@jc21 commented on GitHub (Oct 20, 2020):
No I'm running cockpit on Centos8 stock standard install.
@techpet commented on GitHub (Mar 11, 2021):
It is working for me running cockpit in a docker container with the exception of the thumbnails of the uploaded images that are not shown in the dashboard (check image below - the full image is normally shown nevertheless in fullsize).
Also, I can't find how to make proxy manager work with the solution provided here. When adding a new location and adding the below info:
I get a
rewrite or internal redirection cycle while internally redirecting to "/index.php"error on my proxy manager logs@techpet commented on GitHub (Mar 11, 2021):
Nothing to do with nginx proxy manager in my case, it was a cockpit configuration issue. You need to set site_url parameter in cockpit config file.
@Toomoch commented on GitHub (Jul 1, 2023):
I have the same problem, cockpit redirects to the home page, what did you do exactly? There is no site_url parameter
@march5350 commented on GitHub (Jul 20, 2024):
I also have the same problem when trying to setup Cockpit via Nginx Proxy Manager. Dit anyone of you ever found a solution?
@LKStu commented on GitHub (Jul 26, 2024):
I have the same problem (redirect after login). What is the solution?
@ElderBlade commented on GitHub (Oct 17, 2024):
I'm also having the same issue. I'm following the guide here: https://cockpit-project.org/external/wiki/Proxying-Cockpit-over-NGINX
After editing
/etc/cockpit/cockpit.conf, cockpit login no longer works. I get a login error and the log shows TLS handshake error.When I try to configure a proxy host in nginx proxy manager it shows as offline which seems to be caused by the cockpit.conf file. I'm not sure if I'm entering the custom location info correctly either. Can someone provide a screenshot of what that should look like?
@march5350 commented on GitHub (Oct 19, 2024):
@mmoore7
In the end I was able to solve it by editing the /etc/cockpit/cockpit.conf file like this:
[WebService]
AllowUnencrypted = true
Origins = http://cockpit.lan ws://cockpit.lan
ProtocolHeader = X-Forwarded-Proto
I also turned on websocket support in Nginx Proxy Manager.
After changing these settings it works for me in my local network.
@ElderBlade commented on GitHub (Oct 19, 2024):
@NAmRoD21v thanks for your reply. Unfortunately I still get the 502 bad gateway error.
I'm on Fedora Server 40.
@march5350 commented on GitHub (Oct 20, 2024):
@mmoore7 How did you setup your DNS server and Nginx Proxy Manager?
@ElderBlade commented on GitHub (Oct 20, 2024):
@NAmRoD21v
I'm using adguard as my local DNS server for Nginx Proxy manager. I have a rewrite entry in adguard for
*.mydomain.comwhich resolves to my host machine's IP address where my services are available to the network. Here's my docker-compose.yml. I'm using podman-compose version 1.2.0, podman version 5.2.3.I couldn't figure out how to ensure nginx proxy manage points to my adguard dns server from docker-compose file, so I have a script that write's adguard's IP address into nginx proxy manager
/etc/resolv.conffile.@march5350 commented on GitHub (Oct 23, 2024):
Since I don't use AdGuard, but instead use Pi-hole, I can't say for sure that I can help you. In my Pi-hole compose file I also have the following configured:
Don't know if that is something that will help you. With Pi-hole and NPM I don't need an external script for writing IP addresses to NPM.
@ElderBlade commented on GitHub (Oct 23, 2024):
Writing the IP address is not so much related to adguard as it is to how networking works in podman and my own inexperience. I figured out how to specify IP address for my adguard container and then use the -dns variable to define that IP as the dns for nginx-proxy-manager so editing the
/etc/resolv.conffile is no longer necessary.I suspect my issue is related to SELinux because it's a security module that comes packaged with Fedora Server 40 and it's briefly mentioned in the guide above:
When I change this setting to on, I still get the 502 gateway error. Beyond that, I'm not sure how else to troubleshoot this.
In any case, I have opened a separate issue here: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4079
@camemb3rt commented on GitHub (Mar 26, 2025):
I also changed scheme to HTTPS and enabled Websocket Support on the Details tab.
Important to mention that the .conf file only has those three lines from their example config
The location information from the "Using an external proxy" section would be used on NGINX (proper) or set up like the picture in NGINX-Proxy-Manager.
@ElderBlade commented on GitHub (Mar 27, 2025):
It finally dawned on me that my NPM container is runnning on an isolated network, and cockpit is running on the host, which leads to a 502 bad gateway error. Setting the proxy host in NPM to
host.containers.internalallows NPM to reach the service on the host.This works on my system (Fedora 41) without having to edit/configure
/etc/cockpit/cockpit.conf@wk1093 commented on GitHub (Mar 30, 2025):
I was having a similar issue and I fixed it by enabling "Websockets Support" on Nginx Proxy Manager.