【问题标题】:Server Error 500 Php服务器错误 500 PHP
【发布时间】:2016-06-18 09:30:45
【问题描述】:

美好的一天

我正在尝试在我的 VPS Centos7 64 位上安装一个名为 Swiftpanel 的 PHP 游戏面板

我在我的 vps 上安装了 LAMP,并且 html 文件运行良好。 但是我的游戏面板不起作用

游戏面板位于:

http://51.255.199.40/gpanel/

正如你所见,当我尝试访问我的 gpanel 时,它给了我 SERVER ERROR 500

我查看了我的 apache 错误日志,这是我得到的:

[Fri Mar 04 15:53:53.533162 2016] [autoindex:error] [pid 18753] [client 46.99.59.98:51034] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

这是我的 httpd.conf 和 php.conf:

http://pastebin.com/HJfH3gWQ

我需要一些帮助来解决这个问题,我是编码初学者。

尊重

本杰明·塞尔马尼

【问题讨论】:

    标签: apache centos lamp centos7


    【解决方案1】:

    好的,编辑您的 httpd.conf 文件并更改以下行:

    Options Indexes FollowSymLinks

    到:

    Options +Indexes +FollowSymLinks

    然后重新启动您的 Apache 服务器。如果这不起作用,很可能我们正在编辑错误的 httpd.conf 文件。您会惊讶地发现在您的计算机上可以找到多少,包括子目录中的所有 conf 文件(查看 httpd.conf 文件的最后一行)。某处可能有这样一行:

    Options -Indexes

    这是问题的明确原因。但请先尝试我之前的建议。

    【讨论】:

      【解决方案2】:

      在 httpd.conf 中,尝试更改行:

      <IfModule dir_module>
      DirectoryIndex index.html
      </IfModule>
      

      <IfModule dir_module>
      DirectoryIndex index.html index.php
      </IfModule>
      

      并重新启动 Apache。

      【讨论】:

      • Still 500 Server Error with this in the error Log: [Fri Mar 04 19:29:20.612198 2016] [autoindex:error] [pid 21789] [client 46.99.10.113:53845] AH01276: 不能服务目录 /var/www/html/: 找不到匹配的 DirectoryIndex (index.html,index.php,index.php),并且 Options 指令禁止服务器生成的目录索引
      猜你喜欢
      • 2016-02-11
      • 1970-01-01
      • 1970-01-01
      • 2016-11-28
      • 1970-01-01
      • 2014-06-08
      • 2018-01-15
      • 2010-12-14
      • 1970-01-01
      相关资源
      最近更新 更多