Cannot define multiple Listeners on the same IP:port

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
certbot renew --dry-run

It produced this output:
AH00526: Syntax error on line 5 of /etc/httpd/conf.d/ssl.conf:
Cannot define multiple Listeners on the same IP:port

My web server is (include version):
Apache/2.4.37 (centos)

The operating system my web server runs on is (include version):
CentOS Linux 8 (Core)

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 1.18.0

When trying to get new certificates or renew old ones, I get the error:
AH00526: Syntax error on line 5 of /etc/httpd/conf.d/ssl.conf:
Cannot define multiple Listeners on the same IP:port

There have been a few references to the same error and the solutions have been to comment out "Listen 443" on one config file or another. In my case, that line is in:

grep -i -r "Listen 443" /etc/
/etc/httpd/conf.d/ssl.conf:Listen 443 https
/etc/httpd/conf/httpd.conf:Listen 443

If I comment out either one, the site fails to load and the certbot error changes to:
Failed to renew certificate ---.removed.--- with error: Some challenges have failed.

An added note... Although I was getting the message from certbot that 'apachectl configtest' reported the 'Multiple Listeners' error, I got "Syntax OK" every time I manually ran 'apachectl configtest'.

After reading numerous posts on this site, I finally got certbot to renew without errors after I renamed ssl.conf. (Not just commenting Listen 443 in the file, renaming the whole file)

/etc/httpd/conf.d/ssl.conf --> ssl.conf.backup

apachectl configtest
systemctl restart httpd
systemctl restart php-fpm

Then certbot renew worked properly and my site loaded with a valid cert.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.