VPS侦探论坛

 找回密码
 注册
查看: 4415|回复: 4

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

[复制链接]
发表于 2017-5-1 17:04:01 | 显示全部楼层 |阅读模式

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

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


[Sun Apr 30 08:38:32 2017] [notice] caught SIGTERM, shutting down
[Sun Apr 30 08:38:34 2017] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Apr 30 08:38:34 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Sun Apr 30 08:38:35 2017] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 30 08:38:35 2017] [notice] Digest: done
[Sun Apr 30 08:38:35 2017] [notice] 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
[Sun Apr 30 09:42:14 2017] [notice] SIGHUP received.  Attempting to restart
[Sun Apr 30 09:42:14 2017] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 30 09:42:14 2017] [notice] Digest: done
[Sun Apr 30 09:42:14 2017] [notice] 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
[Mon May 01 10:29:26 2017] [notice] caught SIGTERM, shutting down
[Mon May 01 10:29:28 2017] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon May 01 10:29:28 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Mon May 01 10:29:28 2017] [notice] Digest: generating secret for digest authentication ...
[Mon May 01 10:29:28 2017] [notice] Digest: done
[Mon May 01 10:29:28 2017] [notice] 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
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 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=/
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-5-1 19:08:13 | 显示全部楼层

这个是apache的错误日志不是php的错误日志
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-5-1 20:15:39 | 显示全部楼层



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

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

这是怎么回事呢?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-5-2 08:51:22 | 显示全部楼层

回复 4# 的帖子


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

没有日志没法说具体怎么回事

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-27 05:48 , Processed in 0.044022 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表