Configuring apache virtualhost for running webmin with SSL, but without certificate

3.5k views Asked by At

I am developing a web portal for my home server. I am running a FreeBSD 10.3 server and have apache24 installed.

What I'd like to achieve is running the webmin https://localhost:10000/ port to a subdomain under my app: https://webmin.somedomain.com

I have multiple apps that I have connected using the following httpd.conf virtualhost:

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName webmin.somedomain.com
    ProxyPreserveHost On

    # setup the proxy
    <Proxy *>
        Order allow,deny
        Allow from all
    </Proxy>
    ProxyPass / "http://localhost:10000/"
    ProxyPassReverse / "http://localhost:10000/"
</VirtualHost>

This works fine for a non-SSL page. But because webmin can do a lot of harm, I prefer it to run under SSL.

To get the configuration working, I changed the lines to:

<VirtualHost *:443>
    ServerAdmin [email protected]
    ServerName webmin.somedomain.com
    ProxyPreserveHost On

    # setup the proxy
    <Proxy *>
        Order allow,deny
        Allow from all
    </Proxy>
    ProxyPass / "https://localhost:10000/"
    ProxyPassReverse / "https://localhost:10000/"
</VirtualHost>

However, this does not work.

It worked on SSL before, but probably only because I ran webmin on https://{device IP}:10000/ and not on any vhost or via apache.

I don't get any response from the server on the https://webmin.somedomain.com URL, so I think I am missing something..

Questions 1. Do I need to configure mod_ssl on apache to get this running? 2. Is a certificate and certificate configuration REQUIRED to run a uncertificated connection with my server? 3. Where to start from here?

1

There are 1 answers

0
Ilia Ross On

The problem is, that you need to enable SSLProxyEngine by setting it to on.

By looking at the logs you can find the following on Apache 2.4.

SSL Proxy requested for webmin.yourdomain.com:443 but not enabled [Hint: SSLProxyEngine]

SSLProxyEngine Directive

This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This is usually used inside a section to enable SSL/TLS for proxy usage in a particular virtual host. By default the SSL/TLS Protocol Engine is disabled for proxy both for the main server and all configured virtual hosts.

* Note that the SSLProxyEngine directive should not, in general, be included in a virtual host that will be acting as a forward proxy (using or ProxyRequests directives). SSLProxyEngine is not required to enable a forward proxy server to proxy SSL/TLS requests.

After enabling this directive things started to work as expected.