I've recently moved from Ubuntu to Fedora. I now wish I'd done it a lot earlier because I've realised I don't know nearly as much about Linux as I ought to - Ubuntu hid a lot from me.
Previously on Ubuntu, I had a few virtualhosts pointing at a directory in my user's home dir:
/home/foo/Code/PHP/somedir/
Here is one of the virtualhosts:
<VirtualHost *:80>
DocumentRoot /home/foo/Code/PHP/somedir
<Directory /home/foo/Code/PHP/somedir/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
ServerName database.dev
</VirtualHost>
I have set up database.dev in my hosts file.
What I've done so far:
Upon adding the virtualhost (into /etc/httpd/conf.d/database.dev.conf - is this the right place?), I restarted Apache. I received a few SELinux warnings and troubleshooted them using the tool that came with Fedora. I no longer get SELinux warnings when restarting Apache or viewing http://database.dev/ in my browser. However, I still get 403 errors.
In the DocumentRoot for database.dev, I created a file called "hello.txt" which I attempted to access in my browser. Playing with file permissions and ownership did nothing. Here is a snippet from the error log:
[Sat Dec 31 20:20:34 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /hello.txt denied
[Sat Dec 31 20:20:38 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /hell2o.txt denied
("hell2o.txt" does not exist, "hello.txt" does).
Question: If anyone knows the solution to this problem, please share. If you have a guide to setting up Apache on Fedora (16) - please share that too, I've been unable to find anything specific to Fedora. Anything tailored to previous Ubuntu users would be an added bonus.