Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

A client of mine decided to go ahead and move from a self-signed certificate to a commercial one ("GoDaddy Standard SSL"). The first service I wanted to move to the commercial SSL cert was Webmin/Usermin... However, upon migrating to the new SSL cert and restarting Webmin, I got the following error:

[21/Oct/2012:13:12:47 -0400] Restarting
Failed to open SSL cert /etc/webmin/miniserv.cert at /usr/share/webmin/miniserv.pl line 4229.
Error: Webmin server did not write new PID file

And that's all it says.

Here's Webmin's config file (/etc/webmin/miniserv.conf):

port=10000
root=/usr/share/webmin
mimetypes=/usr/share/webmin/mime.types
addtype_cgi=internal/cgi
realm=Webmin Server
logfile=/var/webmin/miniserv.log
errorlog=/var/webmin/miniserv.error
pidfile=/var/webmin/miniserv.pid
logtime=168
ppath=
ssl=0
env_WEBMIN_CONFIG=/etc/webmin
env_WEBMIN_VAR=/var/webmin
atboot=1
logout=/etc/webmin/logout-flag
listen=10000
denyfile=\.pl$
log=1
blockhost_failures=5
blockhost_time=60
syslog=1
session=1
server=MiniServ/1.600
userfile=/etc/webmin/miniserv.users
keyfile=/etc/webmin/miniserv.pem
passwd_file=/etc/shadow
passwd_uindex=0
passwd_pindex=1
passwd_cindex=2
passwd_mindex=4
passwd_mode=0
preroot=virtual-server-theme
passdelay=1
sudo=1
sessiononly=/virtual-server/remote.cgi
preload=virtual-server=virtual-server/virtual-server-lib-funcs.pl virtual-server=virtual-server/feature-unix.pl virtual-server=virtual-server/feature-dir.pl virtual-server=virtual-server/feature-dns.pl virtual-server=virtual-server/feature-mail.pl virtual-server=virtual-server/feature-web.pl virtual-server=virtual-server/feature-webalizer.pl virtual-server=virtual-server/feature-ssl.pl virtual-server=virtual-server/feature-logrotate.pl virtual-server=virtual-server/feature-mysql.pl virtual-server=virtual-server/feature-postgres.pl virtual-server=virtual-server/feature-ftp.pl virtual-server=virtual-server/feature-spam.pl virtual-server=virtual-server/feature-virus.pl virtual-server=virtual-server/feature-webmin.pl virtual-server=virtual-server/feature-virt.pl virtual-server=virtual-server/feature-virt6.pl
anonymous=/virtualmin-mailman/unauthenticated=anonymous
premodules=WebminCore
logouttimes=
extracas=/etc/webmin/miniserv.chain
certfile=/etc/webmin/miniserv.cert
ssl_redirect=0

Here is a screen shot of the Webmin SSL config screen as well, for what it's worth:

http://postimage.org/image/r472go7tf/

Edited Mon Oct 22 10:45:24 CDT 2012:

When running the command openssl x509 -noout -text -in /etc/webmin/miniserv.cert as Falcon Momot suggested, I get the following error:

unable to load certificate
139760808240800:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:696:Expecting: TRUSTED CERTIFICATE
share|improve this question

2 Answers 2

Check that the file the error refers to is actually there, and the user webmin is running under has permission to open it.

While you're at it, check that the private key is decrypted and accessible as well (most daemons that require SSL keys will open them as root before dropping privileges).

Then, assuming you are using linux, you can check that the certificate is valid:

openssl x509 -noout -text -in /etc/webmin/miniserv.cert

You can also check that the private key is decrypted and matches the public key (in the certificate) by verifying the output of these commands match:

openssl x509 -noout -modulus -in /etc/webmin/miniserv.cert | md5sum
openssl rsa -noout -modulus -in /etc/webmin/miniserv.pem | md5sum

This assumes, of course, that you are using an RSA key (and not, for instance, ECDSA).

share|improve this answer
    
Here is the output from the first command: unable to load certificate 139760808240800:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:696:Expecting: TRUSTED CERTIFICATE. The other two command have different md5sums, but that may be due to the aforementioned error. –  Soviero Oct 22 '12 at 3:22
    
It is due to the error - the first one is the md5sum of either the error or nothing. The error indicates, as I see you found, that you had a bad certificate, or the wrong one. It being in the wrong format makes sense. –  Falcon Momot Oct 23 '12 at 4:39
up vote 1 down vote accepted

Fixed...

Turns out that I downloaded the wrong file from GoDaddy, when I downloaded the "SSL bundle," I originally downloaded the one meant for "other." When I downloaded the one meant for "Apache" instead, everything now works...

Thanks for you help though Falcon Momot...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.