1
1dian01 OP |
2
TakanashiAzusa 2014-07-20 23:30:29 +08:00 1
端口?
|
3
1dian01 OP @TakanashiAzusa
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 4774/mysqld tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7085/nginx tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 626/sshd |
4
feiyuanqiu 2014-07-20 23:53:04 +08:00 via Android
一直是在win下弄php,对linux不熟,但是你这个情况,
1、host有没有把ip指向127? 2、好像你的nginx也没有配置重写,那为什么访问phpinfo.php地址会是info.php?试试把改成phpinfo.php? 确实不懂linux这些东西,不对的地方请大大们指正 |
5
Roboo 2014-07-20 23:53:05 +08:00 via Android
把各项服务都先重启一下 再试一次 还不行 然后看看日志文件
我记得Nginx默认网站路径是什么/HTML 不是www 可能是版本不一样 你先重启服务看下日志 |
6
Roboo 2014-07-20 23:55:23 +08:00 via Android
对 还有ls说的文件的问题 可能是这个
|
7
LiJie 2014-07-21 00:10:40 +08:00
路径是 /usr/share/nginx/html
|
8
tjmao 2014-07-21 03:37:32 +08:00 via iPhone
你自己创建的是phpinfo.php,自然得读出phpinfo.php的内容,方能看到phpinfo.php的输出。
看看 http://ip/phpinfo.php 有没有输出?如果还没有,继续挖日志。 |
9
binux 2014-07-21 03:46:00 +08:00 via Android 1
13: Permission denied
|
10
zjgood 2014-07-21 06:45:09 +08:00 via Android 1
@1dian01 我想你需要 tail -f /var/log/nginx/error.log 看看错误
|
11
kennedy32 2014-07-21 09:43:18 +08:00 1
很早以前遇到过这个问题,之后差不多一年没有遇到过。
一般情况下(一个服务器只有一个php5-fpm+nginx实例,使用默认的www-data用户),应该是不需要修改php5-fpm的ini文件的。 我建议安装顺序改成nginx,php,mysql ,然后修改nginx使php能够运行,然后写一个phpinfo.php |
12
jakehu 2014-07-21 09:57:43 +08:00
装个面板不就完事了吗? wdcp 也可以啊
|
14
1dian01 OP @binux 找到下面这个答案,为啥这样,看不明白,帮忙看看是啥情况
After upgrading to Nginx 1.4.7 and PHP 5.4.28 (or 5.5.12), you may start seeing errors like the following: 2014/05/03 13:27:41 [crit] 4202#0: *1 connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream, client: xx.xxx.xx.xx, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "xx.xx.xx.xx" The fix is to edit /etc/php5/fpm/pool.d/www.conf and set the listen.mode to 666 (be sure to uncomment the line as well): listen.mode = 0666 |
16
binux 2014-07-21 10:27:13 +08:00 1
@1dian01
The fix is to edit /etc/php5/fpm/pool.d/www.conf and set the listen.mode to 666 (be sure to uncomment the line as well): listen.mode = 0666 |
17
ooxxcc 2014-07-21 10:40:45 +08:00 1
注意www.conf里面的
listen.owner = www-data listen.group = www-data listen.mode = 0666 |
19
1dian01 OP It's indeed caused by a recent update of PHP that fixes this (security related) bug: https://bugs.php.net/bug.php?id=67060
Everyone who's running PHP >= 5.5.12 or >= 5.4.28 is affected. It can only be fixed in PuPHPet by changing the listen.mode back to 0666 (not recommended) or making sure the correct user is using the socket. This must be changed in the PuPHPet configuration. |
21
ooxxcc 2014-07-21 10:49:54 +08:00 1
%s,sock,socket,g
|
22
1dian01 OP @ooxxcc 下面是不是说这是一个bug?为啥不建议把listen.mode修改为0666,谢谢
It's indeed caused by a recent update of PHP that fixes this (security related) bug: https://bugs.php.net/bug.php?id=67060 Everyone who's running PHP >= 5.5.12 or >= 5.4.28 is affected. It can only be fixed in PuPHPet by changing the listen.mode back to 0666 (not recommended) or making sure the correct user is using the socket. This must be changed in the PuPHPet configuration. |
23
coolicer 2014-07-21 11:02:21 +08:00
有这么难吗,我装下来都没有问题。
|
25
lsylsy2 2014-07-21 11:33:00 +08:00 1
@1dian01 0666的话,本机上的所有用户都可以以这个用户的身份调用PHP,主要是在虚拟主机一样用户隔离的系统里面
举个例子:用户A写了个PHP,内容是ls /home/b,本来这个是执行不了的(没有权限),但是他把这个PHP发给了/var/run/userb/php.socket,于是就可以查看B的home了 |
26
BOOM 2014-07-21 11:40:22 +08:00
装个LNMP。或者直接把LNMP的代码拿来看看不就行。
|
27
hiths 2014-07-21 14:15:21 +08:00
我也是这个问题,sock监听http返回200,页面却是空白,端口就正常。
|