2014-03-19 16:27
浏览 65


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?

图片转代码服务由CSDN问答提供 功能建议

我安装了Cent OS 6.5,我添加了Apache和PHP。

如果 我在 / var / www / html / 中放了一些文件,我可以在浏览器中查看它们。 问题是,如果我把目录和目录中的一些文件放在一起,我就无法浏览它们而且我得到 Forbidden 错误。

我不知道 由于性能和安全问题,我想使用.htaccess。 如何配置httpd.conf以修复 Forbidden 错误?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doulan3966 2014-03-19 16:32

    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.

    打赏 评论

相关推荐 更多相似问题