views:

613

answers:

2

Hey folks,

I have a clean copy of CentOS.

Just installed Apache, PHP and MySQL. Everything works like a charm.

Except for I created a new user, let's call it 'demo'.

I created a new virtual directory in httpd.conf and pointed it to '/home/demo/www'. I created an empty index.html under '/home/demo/www'.

Apache is running under user 'apache' and group 'apache'.

Maybe user 'apache' does not have access to user 'demo's file, that's why I get the Forbidden problem?

Do you have any ideas how to solve this problem?

Thanks,

James

+1  A: 

Without seeing your config files It is difficult to find the right spot, however Apache will not show 403 if he does not have permissions on files.

403 means the client(your browser) has not a permission to view the content

I think you have a trailing slash problem. Just try this code:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /home/demo/www/
    ServerName DemoSite
    ErrorLog logs/sb-error_log
    CustomLog logs/sb-access_log common
</VirtualHost>
Peter Parker
http://pastebin.com/m2fe5114bThe VirtualHost entry is in the bottom.
A: 

The solution was to give a 'chmod 755' to '/home/demo'.