baiyang 发表于 2017-5-1 17:04:01

网站可以访问,http状态返回500代码

原来是lnmpa0.9,更换至阿里云服务器,重新安装的lnmpa1.3,网站和数据迁移完成,修改dns生效后,网站可以访问,但是http状态却返回500代码。

这是怎么回事呢?在论坛搜索了一下,有说是php版本过高,有的说是防跨目录的原因,现打开php错误日志,粘贴如下:


caught SIGTERM, shutting down
Init: Session Cache is not configured
suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
Digest: generating secret for digest authentication ...
Digest: done
Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips DAV/2 PHP/5.4.45 configured -- resuming normal operations
SIGHUP received.Attempting to restart
Digest: generating secret for digest authentication ...
Digest: done
Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips DAV/2 PHP/5.4.45 configured -- resuming normal operations
caught SIGTERM, shutting down
Init: Session Cache is not configured
suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
Digest: generating secret for digest authentication ...
Digest: done
Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips DAV/2 PHP/5.4.45 configured -- resuming normal operations

baiyang 发表于 2017-5-1 17:48:25

补充,返回http状态码如下:

返回状态码: 500 Internal Server Error
网页返回HEAD信息如下
Server: nginx
Date: Mon, 01 May 2017 09:46:53 GMT
Content-Type: text/html; charset=gbk
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.4.45
Set-Cookie: umnN_2132_saltkey=0C32J0Yq; expires=Wed, 31-May-2017 09:46:53 GMT; path=/; httponly
Set-Cookie: umnN_2132_lastvisit=1493628413; expires=Wed, 31-May-2017 09:46:53 GMT; path=/
Set-Cookie: umnN_2132_sid=i88Pp2; expires=Tue, 02-May-2017 09:46:53 GMT; path=/
Set-Cookie: umnN_2132_lastact=1493632013%09index.php%09; expires=Tue, 02-May-2017 09:46:53 GMT; path=/
Set-Cookie: umnN_2132_sid=i88Pp2; expires=Tue, 02-May-2017 09:46:53 GMT; path=/

licess 发表于 2017-5-1 19:08:13

这个是apache的错误日志不是php的错误日志

baiyang 发表于 2017-5-1 20:15:39

哦,开启php错误日志后,并没有相关的错误记录。

比较奇怪的是,同一个服务器下其他的虚拟主机就没有问题,只有这一个主机在能访问的情况下http返回500,而且只有首页返回500,其他页面都没有这个问题。

这是怎么回事呢?

licess 发表于 2017-5-2 08:51:22

回复 4# 的帖子

没错误日志不一定是没错误,可能没正确开启或者日志文件权限有问题,开启可以看一下置顶帖

没有日志没法说具体怎么回事
页: [1]
查看完整版本: 网站可以访问,http状态返回500代码