When starting webmin service with “/etc/webmin/start” command, the following error occurred and Webmin and its modules, Virtualmin, Usermin and Cloudmin, couldn’t be accessed at port 10000.

# /etc/webmin/start
Starting Webmin server in /usr/libexec/webmin
Failed to open SSL key /home/virtualhost/ssl.key at /usr/libexec/webmin/miniserv.pl line 4432.

If you’re using systemd to try to start Webmin service, the following error messages are shown:

# systemctl start webmin
Job for webmin.service failed because the control process exited with error code. See "systemctl status webmin.service" and "journalctl -xe" for details.

journalctl -xe provides more details:

systemd[1]: Starting LSB: web-based administration interface for Unix systems…
systemd[1]: webmin.service: control process exited, coexited status=2
systemd[1]: Failed to start LSB: web-based administration interface for Unix systems.
systemd[1]: Unit webmin.service entered failed state.
systemd[1]: webmin.service failed.

The error normally happens after installing or playing around with SSL certificate for Webmin and/or virtual servers, especially when SSL certificate and private key for virtual server were applied accidentally to Webmin.

The resolution is to remove the the Webmin miniserv.conf configuration file manually.

  1. SSH to the web host.
  2. Edit the /etc/webmin/miniserv.conf file.
  3. Comment out (by adding # to the beginning of the line) the two lines starting with ipcert and ipkey and contain path to SSL cert and key specified in error message.
  4. Save the modified miniserv.conf.
  5. Start the Webmin: