Page 1 of 1

Unable to restart httpd following adding cert for https

Posted: Thu Apr 25, 2019 7:31 pm
by awilson
Hi. We just created a certfile signed using our MS AD Certificate Services. After setting the /etc/httpd/conf.d/ssl.conf file to point to the new certificate I'm not able to get httpd to restart. There is a message that port 443 is already in use.

[root@lussvpnagxi00 conf.d]# service httpd start
Starting httpd: [Thu Apr 25 19:20:11 2019] [warn] module ssl_module is already loaded, skipping
[Thu Apr 25 19:20:11 2019] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
(98)Address already in use: make_sock: could not bind to address [::]:443
[ OK ]

This persists after replacing the original conf file. I moved the ssl.conf file to another name and then httpd starts. There were users on the system at the time. I didn't think it would matter or require downtime. I made this change on a test server earlier with no issues.

Any thoughts on this?

Thanks!

Re: Unable to restart httpd following adding cert for https

Posted: Fri Apr 26, 2019 12:16 pm
by npolovenko
Hello, @awilson. Are you following this tutorial to set up the ssl?
https://assets.nagios.com/downloads/nag ... s%20XI.pdf

Can you zip and upload all apache config files from this folder?
/etc/httpd/conf.d
And also the main apache config:
/etc/httpd/conf/httpd.conf
Finally, I'd like to see the apache error_log and ssl_error_log from /var/log/httpd folder.

Re: Unable to restart httpd following adding cert for https

Posted: Fri Apr 26, 2019 12:43 pm
by awilson
Hi.
Yes, we followed the linked document. We didn't do the php step though.

The requested files are attached.

Thanks!

Re: Unable to restart httpd following adding cert for https

Posted: Fri Apr 26, 2019 1:58 pm
by scottwilkerson
Your attachment didn't have a /etc/httpd/conf.d/ssl.conf in it.

The error you were getting suggests that there are multiple .conf files in the /etc/httpd/conf.d directory that are both trying to load the same configuration info.

You likely need to move your backup copies to a different location

Re: Unable to restart httpd following adding cert for https

Posted: Fri Apr 26, 2019 2:10 pm
by awilson
I'm sorry. I had to rename the ssl.conf file to sslSAVE.Apr252019. That was the only way to get the system back up.

Re: Unable to restart httpd following adding cert for https

Posted: Fri Apr 26, 2019 2:14 pm
by scottwilkerson
You would need to rename that back to ssl.conf and also rename sslBACKUP.conf to sslBACKUP.confOLD

If you have 2 files that end in .conf that both have these configs you will have an error like you had

Re: Unable to restart httpd following adding cert for https

Posted: Fri Apr 26, 2019 4:23 pm
by awilson
Thank you for catching that. I'll make the changes and confirm.

Re: Unable to restart httpd following adding cert for https

Posted: Fri Apr 26, 2019 4:25 pm
by scottwilkerson
awilson wrote:Thank you for catching that. I'll make the changes and confirm.
sounds good