I have a dev box running and i changed the path of the vhost from /home/username/www to /home/username/public_html.

Retarted apache and now the site is giving me a 403 when i visit the site and php isnt working now either.

The server is centos 5.5 x64, php is 5.3.5

Any help is appriciated.

Cheers.

link|improve this question

75% accept rate
Paste your complete VirtualHost here. – peter Mar 31 '11 at 14:57
@peter: gist.github.com/8dace001c0388b6caf6b – Kyle Hudson Mar 31 '11 at 15:06
feedback

2 Answers

up vote 1 down vote accepted

I am referring the portions between "

<VirtualHost 10.0.2.8:80>

and

</VirtualHost>

Document root and "Directory" directive are different.

DocumentRoot /home/username/public_html
<Directory /home/mobile/www>

Make that same.

Also make sure that there is at least one file in DocumentRoot with any of the following name

index.html index.htm index.php index.php4 index.php5
link|improve this answer
Thanks you Peter that sorted it. :D +1 – Kyle Hudson Mar 31 '11 at 15:44
feedback

Check acccess permission to this folder and to parent folder. Drfault permission to user's homedir in CentOS is 700 (rwx for owner, no access to any other user).

link|improve this answer
@Paul: I did chmod 0777 /home/username/, no luck – Kyle Hudson Mar 31 '11 at 14:58
@Kyle Hudson: ouch, please do not do that unless you do not care about the safety of your server and others. 777 means that anyone can read and write to it. – Lekensteyn Mar 31 '11 at 15:03
@Lekensteyn: It was only a temp measure to ensure it wasn't a simple permissions error. I will restore the permissions when this issue is resolved. Thanks for the concern :) – Kyle Hudson Mar 31 '11 at 15:09
@Kyle Hudson: You said you've chmodded /home/username to 777. That's not recursive, have you tried chmod +rx /home/username/public_html? – Lekensteyn Mar 31 '11 at 15:14
@lekensteyn: No change – Kyle Hudson Mar 31 '11 at 15:16
show 4 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.