httpd virtualhost source in /home
Hi there,
I'm trying to keep the source of my website in my home directory instead of /var/www/html
. Something must be missing, though, because it doesn't work.
What I've done so far:
sudo ln -s /home/oltarus/projects/blog /var/www/html/blog
Not working, I checked that httpd.conf
hadn't been changed and that Options FollowSymLink
was still there for /var/www/html
. Everything looked OK! This is not the way I want to do that anyway, please keep reading.
I then tried something better :
Content of "/etc/httpd/conf.d/blog.conf":
<VirtualHost blog.local:80>
DocumentRoot /home/oltarus/projects/blog
ServerName blog.local
<Directory /home/oltarus/projects/blog>
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
AllowOverride all
</Directory>
</VirtualHost>
I then added the following line to /etc/hosts:
127.0.0.1 blog.local
I also checked that all the directories (home
, oltarus
, projects
and of course blog
) had a o+x
right.
After doing all that, and after a service restart, the "Test Page for the Apache HTTP Server on Fedora" is displayed when I type http://blog.local in my browser, instead of my index.php located in /home/oltarus/projects/blog
.
Any idea where it went wrong along the line?
NOTE: I don't know if it changes a thing, but other websites are set up the same way on my computer (but still located in /var/www/html
for now). They are loaded after, though, because their name comes after "blog" in the alphabetical order.