在子目录中启用php文件?

I installed Cent OS 6.5 and I added Apache and PHP.

If I put some file in /var/www/html/ I can view them in my browser. The problem is, if I put a directory there and some files in the directory, I can't browse them and I get Forbidden error.

I don't want to use .htaccess due to performance and security concerns. How can I configure httpd.conf in order to fix the Forbidden error?

Check the permissions of the folder. Apache probably can't see the file/folder. You need to folder to be at least 0755 and the file to be at least 0644.

If you are using ssh, you should probably setup a umask to set the default permissions of files/folders you create. Or else you will run in to this every time you create a file/folder.