apache服务器CentOS中的访问权限

I have installed a virtual machine CentOS 6.6. I also installed Apache, PHP, MySQL with yum.

I changed my document root from /var/www/html to /www so I edited my /etc/httpd/httpd.conf and changed these two lines:

DocumentRoot "/var/www/html"

<Directory "/var/www/html"> 

I restarted apache and it was okay.

The problem occurred when I tried to open http://192.168.199.90/phpinfo.php. I got:

Forbidden You don't have permission to access /phpinfo.php on this server.

I tried to disable SElinux in /etc/selinux/conf and change enforcing to disabled

I also tried this: chcon -v -R --type=httpd_sys_content_t /www/

And when I write ls -laZ /www, I have:

drw-rw-rw-. www  www  unconfined_u:object_r:httpd_sys_content_t:s0 .
dr-xr-xr-x. root root system_u:object_r:root_t:s0      ..
-rwxrwxrwx. root root unconfined_u:object_r:httpd_sys_content_t:s0 phpinfo.php
drw-rw-rw-. www  www  unconfined_u:object_r:httpd_sys_content_t:s0 sites

Thank you all , i resloved it,

I changed the Current mode of SElinux from enforcing to permissive by wrinting in the terminal :

setenforce 0

so when i write

getenforce i get Permissive

I did also chmod 755 -Rf /www

;)

Edit httpd.conf file, which is in /etc/httpd/conf/httpd.conf. Add the below code.

<Directory "/var/www/html">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride None
Allow from all
</Directory>

Try:

chown -R apache:apache /www

or

chown -R www-data:www-data /www

BTW, never disable your SElinux