Travis Johnston
Travis Johnston

Reputation: 473

New Virtualhosts load default site since Apache/Ubuntu upgrade

I upgraded our web server from Ubuntu 12.04 to 14.04, which also upgraded Apache from 2.2 to 2.4.

The upgrade was successful and all existing virtualhosts are running great.

I created a new site yesterday and noticed that it was loading the default host instead of the one it should. I checked the .conf file in /etc/apache2/sites-enabled and it does look a little different than the other ones.

I understand that Apache 2.4 has some changes like "Require all granted" which shows in the new .conf file alongside the previous "allow from all". I tried commenting it out but that didn't do anything.

I guess I could try backing up this file and copying over an existing working .conf file and just modify the paths to see if that works - but having to do this for every new site I add in the future is not a solution.

Does anyone experience this during their upgrade process?

--- UPDATE ---

I looked again at the conf file and I noticed that all my other working conf files have 2 distinct differences:

So I added the IP in the broken file in the <VirtualHost...> and duplicated the settings for port 443, restarted apache, and the site worked.

So now it comes down to where in the Virtualmin/Webmin settings would I make adjustments to fix this?

Upvotes: 0

Views: 113

Answers (1)

Zahid Gill
Zahid Gill

Reputation: 302

While creating, first option is which IP you want to bind you domain to. That is very IP you have defined against your domain DNS.

enter image description here

But that is only needed if you have bounded IP with port in your conf file.

By default its *:80. So no need to bind.

Upvotes: 1

Related Questions