Issue fresh install on ubuntu 24.04

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 and version Ubuntu Linux 24.04.3
Usermin version 2.400
Virtualmin version 7.40.0
Theme version 25.01
Apache version 2.4.58
Package updates 3 package updates are available

Remove everything after listen 443

and restart apache or the entire vps?

hmmm
forum.virtualmin.com/t/apache-error-ah00526-cannot-define-multiple-listeners-on-the-same-ip-port/134963forum.virtualmin.com/t/apache-error-ah00526-cannot-define-multiple-listeners-on-the-same-ip-port/134963

Oops! That page doesn’t exist or is private.

As apache has not started just start apache and see if it errors

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.

AH00112: Warning: DocumentRoot [/home/._hostname/public_html] does not exist
AH00112: Warning: DocumentRoot [/home/._hostname/public_html] does not exist
AH00526: Syntax error on line 47 of /etc/apache2/sites-enabled/0-vmi2804270.contaboserver.net.conf:
SSLCertificateFile: file ‘/etc/ssl/virtualmin/175761053951275/ssl.combined’ does not exist or is empty

Let’s try again. Not sure why a copy/paste didn’t work.

yes, the link works now, I already read the post.

i’ve the same issue

cat /etc/apache2/ports.conf

Listen 80

Listen 443

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.

AH00112: Warning: DocumentRoot [/home/._hostname/public_html] does not exist
AH00112: Warning: DocumentRoot [/home/._hostname/public_html] does not exist
AH00526: Syntax error on line 47 of /etc/apache2/sites-enabled/0-vmi2804270.contaboserver.net.conf:
SSLCertificateFile: file ‘/etc/ssl/virtualmin/175761053951275/ssl.combined’ does not exist or is empty

I’ve deleted the files inside → sites-available and sites-enabled with the wrong host and now works.

I just did a fresh install of Virtualmin on Ubuntu 24.04 and the apache service would not start. The ports.conf file looked like this (replaced my IP with “111.111.111.111”):

Listen 80
Listen 111.111.111.111:443

<IfModule ssl_module>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

Editing the file to this resolved the issue:

Listen 80
Listen 443

So it seems there still is an issue somewhere in the install script.

You just need to remove the duplicate Listen directives from /etc/apache2/ports.conf. Keep only one Listen 80 and one Listen 443 (plus the specific IP lines if you need them). After editing, restart Apache with systemctl restart apache2.

Hope this work.

Yes, that works but it’s not a great look when a fresh install is broken “out of the box.” I assumed a developer would want to know.

Is this a bug with virtualmin or the users setup?

Only one SSL/tls listener is needed.

It’s a known bug, i think illa has already fixed it

1 Like

All I did is install Ubuntu minimal, install Virtualmin, log into the web interface, and go through the initial setup wizard with all defaults. The apache service was stopped and would not start.

This has been fixed. Pretty sure its the same issue.

If it’s fixed, why did it just happen yesterday?

it has been fixed in the next release that you have be patient and wait for. these things are not instant fixes.