Cockpit within httpd


I'd love to use Cockpit, but I cannot open port 9090 for the access
in all cases. I'd like to access it via my usual http port (such as
80) where I'm limited to a single HTTP port. I understand the
security implications, and can deal with them later.

My attempt was to allow the following URL to access the cockpit functionality:

<a href="" title=""></a>
(not the real URL)
where '' is one of the virtual web sites on my server.

I tried as follows for the definition of the virtual server:

<VirtualHost *:80>
ServerAdmin <a href="mailto: ... at example dot com"> ... at example dot com</a>
DocumentRoot /home/xxx/public_html
Options +ExecCGI +Includes +FollowSymLinks
LogFormat Combined
TransferLog /var/log/httpd/u_xxx_access_log
ErrorLog /var/log/httpd/u_xxx_error_log
RewriteEngine on

ProxyPreserveHost On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /cockpit/(.*) ws://$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /cockpit/(.*) ws://$1 [P,L]
ProxyPass /cockpit/ <a href="" title=""></a>
ProxyPassReverse /cockpit/ <a href="" title=""></a>

All I get is a blank page displayed when I try to access the
url. Testing Cockpit by accessing port 9090 works fine.

Am I missing something?

Thanks in advance


Re: Cockpit within httpd

By m.roth at 04/12/2019 - 13:34

david wrote:
Second, I know nothing about it, and I don't know what it's written in (is
it tomcat?) - but at any rate, I'd assume there is a configuration file
for the application itself that sets that.