I am running Linux mint and I'm trying to setup up a virtual host with apache.
I have added the following file in /etc/apache2/sites-available/ ( it's copied from the 'default' file in that directory)
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName testsite.dev
DocumentRoot /home/chris/Projects/web/testsite
<Directory /home/chris/Projects/web/testsite>
Allow from all
AllowOverride All
Order allow,deny
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
I have also added an entry in my hosts file (/etc/hosts) which would be:
127.0.0.1 testsite.dev
I've also enabled the site and reloaded the apache service with:
a2ensite testsite
service apache2 reload
However when I browse to http://testsite.dev it's serving pages from /var/www/ instead of /home/chris/Projects/web/testsite.
What am I doing wrong?