Hopefully this is quick and easy. I’m running a server with cockpit installed natively (using apt), so NOT running in a container. I’m also running a letsencrypt container to proxy requests to multiple other containers. Cockpit exposes a web interface on the host server on port 9090, so I figured it would be pretty simple to copy-paste one of the other proxy-pass configs. Unfortunately its not working I was hoping somebody here better w/ nginx configs could help.
Here is my custom cockpit proxy config:
# make sure that your dns has a cname set for cockpit and that your cockpit container is not using a base url
server {
listen 443 ssl;
server_name cockpit.*;
# hide site from search engines
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
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;
location / {
# allow local addresses without http auth
satisfy any;
allow 192.168.1.0/24;
allow 127.0.0.1;
deny all;
# enable the next two lines for http auth
auth_basic "Restricted";
auth_basic_user_file /config/nginx/.htpasswd;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_cockpit cockpit;
proxy_pass http://192.168.1.200:9090;
}
}
To be clear, all of my other services are working (sonarr, radarr, etc.). I copied this from the deluge.subdomain.conf file that is working (and just changed deluge -> cockpit, and change port to 9090). My general config seems to be fine, its just this one proxy that isn’t working.
When I go to https://cockpit.my.domain.org in chrome I get a “This page isn’t working cockpit.my.domain.org redirected you too many times.” error.
Any help is appreciated!