Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 7137  / 2 Years ago, sun, april 24, 2022, 10:34:15

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

More From » apache2

 Answers
6

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


[#25722] Monday, April 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ravturtl

Total Points: 335
Total Questions: 132
Total Answers: 110

Location: Tanzania
Member since Wed, Feb 24, 2021
3 Years ago
;