2

So I have updated to Ubuntu 14.04 LTS from 12.04. The problem is that my existing virtual hosts are not working after the upgrade. And yes I have tried

sudo a2ensite test.dev

but it says:

ERROR: Site test.dev does not exist!

This is what I have in the /etc/apache2/sites-available directory

test.dev       mysite.dev      anothersite.dev

the content of test.dev is

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName test.dev
    ServerAlias www.test.dev
    DocumentRoot /var/www/test
</VirtualHost>

and the hosts file

127.0.0.1     test.dev
127.0.0.1     www.test.dev
Braiam
  • 67,791
  • 32
  • 179
  • 269
  • Although this question for 13.10, the same problem happens when upgrading from 12.04 to 14.04: http://askubuntu.com/questions/362682/ubuntu-13-10-server-403-error-after-upgrading-to-apache2-4/362992#362992 – Dan Apr 24 '14 at 06:39

2 Answers2

4

14.04 upgrades your Apache to 2.4 From this version the config files need to have the .conf extensions, in your case:

test.dev.conf
mysite.dev.conf
anothersite.dev.conf

Just rename your files. You may also need to include some new permissions for the directory

Here's a pretty good guide: https://library.linode.com/web-servers/apache/2.2-2.4-upgrade

0

Well, I have been trying all these solutions offered..but sadly nothing worked! Alas i edited

/etc/hosts

to make entry

127.0.1.1 example.com test.com

and it worked!!

(Sorry if I'm not talking much technically!)