Cannot define multiple Listeners on the same IP:port

My domain is: bitt.store

I ran this command: sudo certbot --apache

It produced this output:

Error while running apachectl configtest.

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

My web server is (include version): Apache 2.4.37

The operating system my web server runs on is (include version): CentOS 7

My hosting provider, if applicable, is: Vultr

I can login to a root shell on my machine: Yes

I’m using a control panel to manage my site: No

The version of my client is: 0.31.0

The line 359 in the http.conf file is:
Include sites-enabled/*.conf
and it’s the last line of the file.
The Virtual Host file in that directory is:

<VirtualHost *:80>
    ServerName bitt.store
    ServerAlias www.bitt.store
    DocumentRoot /var/www/html

    <FilesMatch \.php$>
        SetHandler "proxy:fcgi://127.0.0.1:9000"
    </FilesMatch>
    ErrorLog /var/www/html/error.log
    CustomLog /var/www/html/requests.log combined
</VirtualHost>

Also that is the only vhost file, there are no other sites hosted on that server. What does this error mean? Cannot define multiple Listeners on the same IP:port
I checked and there are no other services using port 80 other than httpd. Is it an error related to php-fpm?
Thanks in advance for the help.

Hi @OsoPolar

do you have a standard config file? There may be the first port 80 - vHost. The second produces the error.

I don’t think so, although I’m not sure how to check that, the only file in the sites-enabled directory is bitt.store.conf and it’s content it’s the one I posted above.
Do you know how could I check if there is another directory or file that could be producing that error?
Thank you!

That’s

#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf

the standard configuration. So check /etc/apache2/apache2.conf

Two Listen 80 are impossible, remove the second.

Oh ok, I see,
I tried commenting #Listen 80 in /var/default-conf/httpd/conf/httpd.conf, restarting httpd and running certbot again but it still showed the error. Then I commented also the Listen 80 line from /etc/httpd/conf.d/http.conf, restart and run certbot again and this time the error was gone and it could continue but the server stopped serving the website.
(Thanks for the patience)

@joohoi, could you take a look at this briefly? It might be related to the other ongoing CentOS stuff, but in a different way.

Hi Team,

I too am on Vultr with a vanilla LAMP stack on CentOS7 with the same issue.

Regards

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