Setup Virtual host in home directory
This is an extension to the following question :
https://askubuntu.com/questions/617190/how-to-setup-apache2-virtualhosts-on-your-home-directory-on-ubuntu-14-04
I'm trying to setup a virtual host to run apps from my home directory
/home/byteseeker/projects/blogapp
I followed all the steps listed by the user @Vinicius Santana and also included the correction answered by @Doug Smythies in the above mentioned question.
The Virtual Host file in
/etc/apache2/sites-available/blogapp.conf
looks like this
< VirtualHost *:80 >
ServerAdmin webmaster@blogapp.dev
ServerName blogapp.dev
ServerAlias www.blogapp.dev
DocumentRoot /home/byteseeker/projects/blogapp/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
< /VirtualHost >
And the < Directory > tag in
/etc/apache2/apache2.conf
(as pointed out in referred question's solution ) looks like this
< Directory / >
Options FollowSymLinks
AllowOverride None
Require all denied
< /Directory >
< Directory /usr/share >
AllowOverride None
Require all granted
< /Directory >
< Directory /var/www/ >
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
< /Directory >
< Directory /home/byteseeker/projects/blogapp/ >
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
< /Directory >
The Hosts file in
/etc/hosts
has the contents as
127.0.0.1 localhost
127.0.0.1 anonymous
127.0.0.1 blogapp.dev
I have also put a "index.html" file in
/home/byteseeker/projects/blogapp
with a simple welcome message
Now when I try to go to blogapp.dev , I always end up getting the same "It Works" page that I get when accessing "localhost"
What's possibly wrong with my setup ?
NB: I'm using
上一篇: apache2 expires.conf全局ubuntu 14.04
下一篇: 在主目录中设置虚拟主机