# Cannot define multiple Listeners on the same IP:port

**URL:** <https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963>\
**Category:** Help\
**Created:** [March 6, 2019, 9:11am UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963 "2019-03-06T09:11:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![OsoPolar](https://avatars.discourse-cdn.com/v4/letter/o/4bbf92/32.png) [@OsoPolar](https://community.letsencrypt.org/u/OsoPolar)\
**Post date:** [March 6, 2019, 9:11am UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/1 "2019-03-06T09:11:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [March 6, 2019, 9:19am UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/2 "2019-03-06T09:19:39Z")

</div>

Hi @OsoPolar

> [@OsoPolar](#):
>
> Also that is the only vhost file, there are no other sites hosted on that server.

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

---

<div class="post-metadata">

**Author:** ![OsoPolar](https://avatars.discourse-cdn.com/v4/letter/o/4bbf92/32.png) [@OsoPolar](https://community.letsencrypt.org/u/OsoPolar)\
**Post date:** [March 6, 2019, 9:32am UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/3 "2019-03-06T09:32:07Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [March 6, 2019, 10:00am UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/4 "2019-03-06T10:00:19Z")

</div>

That’s

```auto
#	/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

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [March 6, 2019, 11:12am UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/6 "2019-03-06T11:12:40Z")

</div>

> [@OsoPolar](#):
>
> **Listen 80** uncommented

Two `Listen 80` are impossible, remove the second.

---

<div class="post-metadata">

**Author:** ![OsoPolar](https://avatars.discourse-cdn.com/v4/letter/o/4bbf92/32.png) [@OsoPolar](https://community.letsencrypt.org/u/OsoPolar)\
**Post date:** [March 6, 2019, 12:16pm UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/7 "2019-03-06T12:16:27Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [March 6, 2019, 6:14pm UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/8 "2019-03-06T18:14:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chalee](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@chalee](https://community.letsencrypt.org/u/chalee)\
**Post date:** [March 11, 2019, 9:25pm UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/9 "2019-03-11T21:25:58Z")

</div>

Hi Team,

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

Regards

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [April 10, 2019, 9:26pm UTC](https://community.letsencrypt.org/t/cannot-define-multiple-listeners-on-the-same-ip-port/87963/10 "2019-04-10T21:26:04Z")

</div>

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