# Installed Virtualmin, apache configuration errors

**URL:** <https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008>\
**Category:** Help! (Home for newbies)\
**Created:** [September 12, 2025, 11:35am UTC](https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008 "2025-09-12T11:35:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ano](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@Ano](https://forum.virtualmin.com/u/Ano)\
**Post date:** [September 12, 2025, 11:35am UTC](https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008/1 "2025-09-12T11:35:41Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Debian 12 |
| Virtualmin version | 7.40.0 |

I’ve installed Debian 12 on a fresh VPS.  
I’ve run the installation command and it was succesful. I’ve installed version Virtualmin Virtual Servers Version 7.40.0

When I log in and complete the wizard, it shows:

```auto
**Warning!** The Apache configuration on your system has errors! This will prevent any new domains from being fully added by Virtualmin until the errors are fixed.

AH00526: Syntax error on line 3 of /etc/apache2/ports.conf: Cannot define multiple Listeners on the same IP:port Action 'configtest' failed. The Apache error log may have more information.

```

When I check the ports.conf it shows:

```auto
Listen 80
Listen 443
Listen 80
Listen <my ip>:443
Listen 80
Listen <my ip>8:443
Listen [<my ip v6>]:443

```

Any idea why this happens?

After some more googling I found this user with the same issue: [Apache error: AH00526: Cannot define multiple Listeners on the same IP:port](https://forum.virtualmin.com/t/apache-error-ah00526-cannot-define-multiple-listeners-on-the-same-ip-port/134963)

Also, when checking the installation logs:

```auto
[2025/09/12 11:29:01] [INFO] - Configuring Virtualmin
[2025/09/12 11:30:19] [INFO] - Code: 0 Result: 
[2025/09/12 11:30:19] [INFO] - Succeeded
[2025-09-12 11:30:20 UTC] [DEBUG] SSL certificate request for the hostname : 0 : Failed to set up SSL certificate for the <my hostname> hostname
[2025-09-12 11:30:20 UTC] [DEBUG] Cleaning up temporary files in /tmp/.virtualmin-18803.
[2025-09-12 11:30:20 UTC] [DEBUG] Primary address detected as <my ip>
[2025-09-12 11:30:20 UTC] [SUCCESS] Installation Complete!

```

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [September 12, 2025, 12:00pm UTC](https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008/2 "2025-09-12T12:00:24Z")

</div>

see this looks like the same problem

> [@Issue fresh install on ubuntu 24.04](https://forum.virtualmin.com/t/issue-fresh-install-on-ubuntu-24-04/134998):
>
> Hi, i’ve installed a new vps with ubuntu 24.04 and after the wizard on virtualmin, i’ve this error: AH00526: Syntax error on line 3 of /etc/apache2/ports.conf: Cannot define multiple Listeners on the same IP:port and inside the file i’ve these lines: Listen 80 Listen 443 Listen 80 Listen 62.169.x.x:443 Listen 80 Listen 62.169.x.x:443 Listen [2a02:c207:2280:x::1]:443 How can i fix ? I don’t why there’re the same port in differents lines. Thanks SYSTEM INFORMATION OS type a…

look near the bottom of the thread for a work around

---

<div class="post-metadata">

**Author:** ![Ano](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@Ano](https://forum.virtualmin.com/u/Ano)\
**Post date:** [September 12, 2025, 12:37pm UTC](https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008/3 "2025-09-12T12:37:18Z")

</div>

Thank you, that seems to work. I’ve removed the double lines from ports.conf (not sure if that’s necesarry and  
I’ve removed the file  
0-.conf from /etc/apache2/sites-available and /etc/apache2/sites-enabled and now the error is gone.

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [September 12, 2025, 12:40pm UTC](https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008/4 "2025-09-12T12:40:18Z")

</div>

> [@Ano](#):
>
> I’ve removed the double lines from ports.conf (not sure if that’s necesarry

for anyone reading this, you do need to remove the duplicate port entries.  
glad you fixed it

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [September 12, 2025, 12:47pm UTC](https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008/5 "2025-09-12T12:47:16Z")

</div>

> [@Ano](#):
>
> Thank you, that seems to work. I’ve removed the double lines from ports.conf (not sure if that’s necesarry and  
> I’ve removed the file  
> 0-.conf from /etc/apache2/sites-available and /etc/apache2/sites-enabled and now the error is gone.

Both of these issues, like the incorrect port declaration in `ports.conf` and the Apache site config not clearing after an SSL request for the hostname during the initial installation, are related to a bug in the current Virtualmin Config v7.0.21.

> [@Apache error: AH00526: Cannot define multiple Listeners on the same IP:port](https://forum.virtualmin.com/t/apache-error-ah00526-cannot-define-multiple-listeners-on-the-same-ip-port/134963/21):
>
> @Jamie, okay, I remembered we’ve had this issue before. And, it was due to a bug in Virtualmin Config where Apache config files were edited incorrectly outside of the Apache Webmin module, causing cache corruption. To fix this, @Joe needs to release an updated version of the Virtualmin Config package that is still compatible with Virtualmin 7 repos.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [September 20, 2025, 12:48pm UTC](https://forum.virtualmin.com/t/installed-virtualmin-apache-configuration-errors/135008/6 "2025-09-20T12:48:15Z")

</div>

Closed on September 20, 2025, 12:48pm UTC

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