vhost using local IP on 443 instead of * when Virtual Server SSL configuration options are changed.

Hi I have a strange issue.

I have several Virtual Servers all using different domains with some having purchased/verified SSL certs and some using self-signed.

The problem is when I want to add or renew a new purchased SSL for a Virtual Server and I click configuration options and enable SSL (if it’s not already enabled), and save it then Virtualmin says “Updating IP… Enabling SSL” etc. Ok so then I install the SSL and everything looks good.

Until I then visit any of my Virtual Servers and discover they’re all trying to use the new SSL cert, not just the domain that I installed it on.

I found how to rectify this by then manually editing the vhost file. In the vhost the domain is putting the local IP address in the 443 section rather than the asterisk * that it should have there. Once I put the * back everything works again as it should.

E.g. the /etc/apache2/sites-available/domain.conf file wrongly has:

ServerName domainnamehere.com RewriteEngine On

Instead of:

ServerName domainnamehere.com RewriteEngine On

So then once the asterisk is back all is good, until I then modify some SSL cert again in Virtualmin and click save and then it mashes it up again.

I hope someone can help as I’m told it is just a configuration issue.

Much appreciated! :slight_smile:


Hmm, what is the output of this command:

grep -i ‘<VirtualHost.*443’ /etc/apache2/sites-enabled/*.conf

If you like, you can mask the domain names in the output.


Hi thanks for the reply, I get the following:

/etc/apache2/sites-enabled/0-domain.name.conf:<VirtualHost *:443>
/etc/apache2/sites-enabled/domainname2.com.conf:<VirtualHost *:443>
/etc/apache2/sites-enabled/domainname3.com.conf:<VirtualHost *:443>

etc and they all have the asterisk…

Hi soydemadrid, did you find a solution to your problem? I get the same symptoms.

Hi I still have this issue and it may be a bug… I just edit the apache zone files manually and change the IP address to an asterisk. Restart Apache and all works OK again.

Because I work with shared IP addresses on the server, I cannot just use the asterisk. Instead I set the shared IP address in place of the ‘*’ and restarted Apache. It worked!

/etc/apache2/sites-enabled/example.com.conf: /etc/apache2/sites-enabled/site1.example.com.conf: /etc/apache2/sites-enabled/site2.example.com.conf:

BTW, I’m running Virtualmin Pro 5.04 on Ubuntu 16.04 LTS. Thanks for sharing the work-around!

I’m glad it worked and also glad to be of help. I’m on Ubuntu too BTW.