douzhunlan5930 2014-03-19 16:27
浏览 65
已采纳

在子目录中启用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?

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探