Luka
Luka

Reputation: 1801

Enable php files in child directories?

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?

Upvotes: 0

Views: 54

Answers (1)

Jonathan Kuhn
Jonathan Kuhn

Reputation: 15311

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.

Upvotes: 1

Related Questions