PHP脚本返回500内部服务器错误

时间:2019-07-19 21:27:31

标签: php apache centos cgi

PHP脚本出现500错误,但是HTML文件没有问题。

这是我的配置:

httpd.conf

    <VirtualHost 127.0.0.1:8080>
    ServerName example.com
    DocumentRoot /var/www/example/data/www/example.com
    ServerAdmin example@mail.com
    AddDefaultCharset off
    SuexecUserGroup root root
    CustomLog /var/www/httpd-logs/example.com.access.log combined
    ErrorLog /var/www/httpd-logs/example.com.error.log
    <FilesMatch "\.ph(p[3-5]?|tml)$">
        SetHandler application/x-httpd-php5
    </FilesMatch>
    SetEnvIf X-Forwarded-Proto https HTTPS=on
    ScriptAlias /php-bin/ /var/www/php-bin-isp-php56/example/
    AddHandler application/x-httpd-php5 .php .php3 .php4 .php5 .phtml
    Action application/x-httpd-php5 /php-bin/php
    ScriptAlias /cgi-bin/ /var/www/example/data/www/example.com/cgi-bin/
    ServerAlias www.en.tour.mosmetro.ru
    DirectoryIndex index.html index.php
    </VirtualHost>
    <Directory /var/www/example/data/www/example.com>
        Options +ExecCGI
    </Directory>

错误日志

[Sat Jul 20 00:13:42.939412 2019] [cgi:error] [pid 6532] [client 127.0.0.1:39994] End of script output before headers: php

0 个答案:

没有答案