Can now see CV's (thanks!) but blocked from local host

Hi all, so far so good thanks heaps for all your help so far (esp, Joe and A H).

I was trying to place an index.html into /var/www/ but couldn’t because… it just wouldn’t let me.

I did a sudo chown myUsername /var/www/
it let me place the index file in teh directory however when i go to
http://localhost/ i get 403’d you don’t have persmission to access / on this server.

Any help on how to fix this?
( chown root doesnt change anything either)

Hey Justin,

I suggest letting your websites live in /home, rather than /var/www, and rebuilding Apache to have suexec docroot set to /home (if it weren’t significantly better to put homes in /home, we wouldn’t go to all the trouble to rebuild Apache for every single platform we support).

But /var/www can work if you don’t mind jumping through the extra hoops.

In your specific case, Apache needs to be able to read /var/www, so make sure it is mode 755. Likewise for the file you want it to read.

Since this is a Red Hat system, you may also be seeing SELinux privileges kicking in. Simply turning it off is the easiest way to get things working. It’s possible to run a hosting server with SELinux running, but it’s a challenge–and every time you do something new, you’ll have to work on the policy (this is the reason we don’t work with SELinux just yet, though it is in the plans).

You can disable SELinux for testing:

setenforce 0

(setenforce 1 turns it back on)