nginx+ PHP 的问题

2019-01-07 17:34:58 +08:00
 qwertyzzz

使用的 phpstudy,但是 nginx+mysql 启动起来就是不能正常访问,apache 倒是可以,查看 nginx 错误日志是这个错误 upstream prematurely closed connection while reading response header from upstream,

具体界面是

An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

配置文件就先不贴了 不知道有没遇到相同情况的 ,实在没有我在贴一下配置文件 ,主要配置文件是 phpstudy 自己的 按道理应该没问题 不知道是否是哪边参数需要改下

3357 次点击
所在节点    PHP
11 条回复
liaoguiming
2019-01-07 17:42:04 +08:00
php-cgi
qwertyzzz
2019-01-07 17:46:25 +08:00
@liaoguiming 咋整
utfqvfhpyygy
2019-01-07 17:50:08 +08:00
nginx 链接 php 那边有问题了,要不就是 php.这种问题看日志分析
qwertyzzz
2019-01-07 17:54:16 +08:00
@utfqvfhpyygy 同事电脑可以的。。妈的 不知道我这边啥问题
gstqc
2019-01-07 18:08:02 +08:00
日志
日志
日志
qwertyzzz
2019-01-07 18:12:15 +08:00
@gstqc 看了个 nginx 日志额 发在上面。。 最开始那句 ,其他还需要看哪边日志呀
qwertyzzz
2019-01-07 18:31:10 +08:00
解决了。。。有个 TransHost.exe 的破东西占着 9000 端口。。强制删除后好了
EvilCult
2019-01-07 18:46:36 +08:00
/var/log/nginx/error.log

如果是 Linux 系统的话默认在这
你那个不叫日志, [手动捂脸]
tomczhen
2019-01-07 18:51:13 +08:00
看到 nginx 不可以,apache 可以就能大概猜到了。

nginx+php-fpm,apache 是内置 php mod,由于页面能现实,所以排除 nginx 本身问题,那么应该是 php-fpm 出了问题。

话说开发环境下,php artisan serve / php -S localhost:8000 足够。生成环境 windows 上使用 iis+php cgi 也强得多,干嘛要用 phpstudy。。。
qwertyzzz
2019-01-07 22:42:03 +08:00
@EvilCult 贴的长的是界面啊 日志里的内容我复制出来了 就第一句
qwertyzzz
2019-01-07 22:42:51 +08:00
@tomczhen 小白呀 phpstudy 还是挺方便的。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/524717

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX