Cannot define multiple Listeners on the same IP:port

My domain is: projects.mydomain.net

I ran this command: certbot install --cert-name projects.mydomain.net

It produced this output:
Successfully deployed certificate for projects.mydomain.net to /usr/local/etc/apache24/sites-available/projects.mydomain.net-le-ssl.conf
Error while running apachectl configtest.
Performing sanity check on apache24 configuration:

AH00526: Syntax error on line 541 of /usr/local/etc/apache24/httpd.conf:
Cannot define multiple Listeners on the same IP:port

We were unable to install your certificate, however, we successfully restored your server to its prior configuration.
Error while running apachectl configtest.
Performing sanity check on apache24 configuration:

AH00526: Syntax error on line 541 of /usr/local/etc/apache24/httpd.conf:
Cannot define multiple Listeners on the same IP:port

My web server is (include version): Apache24

The operating system my web server runs on is (include version): freebsd 13.1-RELEASE

The version of my client is : certbot 1.31.0

I've also ran : grep -Ri listen /usr/local/etc/apache24/

/usr/local/etc/apache24/extra/httpd-ssl.conf:Listen 443
/usr/local/etc/apache24/httpd.conf:Listen 80

And when I ran : apachectl configtest
Performing sanity check on apache24 configuration:
Syntax OK

I've read also read the posts on the same topic, but no solution for me.
Thanks.
Laurent

Hi @Laurent1, and welcome to the LE community forum :slight_smile:

This is likely an Apache misconfiguration.
We should have a look at that file.

I have very little confidence with apache checks.

2 Likes

Thanks.

But Apache doesn't make an error when it's started.

But certbot doesn't use apachectl ?

It must make a change to the apache config; as per your --install request.
And how would it otherwise check the modified config?

3 Likes

Solved:

In ma configuration, in extra/httpd-ssl.conf I have :
Listen 443

Or certbot change the httpd.conf with these two lines:

IfModule mod_ssl.c
Listen 443
/IfModule

Then, we have two Listen 443.

I've comment the line with Listen 443 in extra/httpd-ssl.conf to solve it.

Laurent

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