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

7 posts / 0 new
Last post
#1 Mon, 08/01/2016 - 02:25
soydemadrid

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:

<VirtualHost 192.168.1.245 :443>
    ServerName domainnamehere.com
    RewriteEngine On

Instead of:

<VirtualHost *:443>
    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! :)

Mon, 08/01/2016 - 09:11
andreychek

Howdy,

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.

-Eric

Mon, 08/01/2016 - 10:01
soydemadrid

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...

Tue, 11/15/2016 - 08:09
pascalm1

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

Tue, 11/15/2016 - 09:10
soydemadrid

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.

Tue, 11/15/2016 - 10:07 (Reply to #5)
pascalm1

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:<VirtualHost 10.6.61.219:443>
/etc/apache2/sites-enabled/site1.example.com.conf:<VirtualHost 10.6.61.219:443>
/etc/apache2/sites-enabled/site2.example.com.conf:<VirtualHost 10.6.61.219:443>

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

Wed, 11/16/2016 - 00:53
soydemadrid

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

Topic locked