daixh 发表于 2015-7-16 23:22:10

FTP WEB管理的问题

今天2015-7-16 21:00下载的最新包,在centos6.6 64位安装,完后安装FTP,安装完后打开:http://机器IP/ftp , 页面等很久,最后出现502的结果,此时phpmyadmin管理数据库,刷新探针页面都是正常的,说明后端php-fpm并没有挂掉,我查看php-fpm.conf文件,看到有指定的日志配置:slowlog = var/log/slow.log,下面是日志的内容:

WARNING: child 1682, script '/home/wwwroot/default/ftp/index.php' (request: "GET /ftp/index.php") execution timed out (112.495008 sec), terminating
WARNING: child 1182, script '/home/wwwroot/default/ftp/index.php' (request: "GET /ftp/index.php") execution timed out (120.557704 sec), terminating
WARNING: child 1181, script '/home/wwwroot/default/ftp/index.php' (request: "GET /ftp/index.php") execution timed out (127.418516 sec), terminating
WARNING: child 1181 exited on signal 15 (SIGTERM) after 133.361781 seconds from start
NOTICE: child 1711 started
WARNING: child 1182 exited on signal 15 (SIGTERM) after 133.361789 seconds from start
NOTICE: child 1712 started
WARNING: child 1682 exited on signal 15 (SIGTERM) after 120.347142 seconds from start
NOTICE: child 1713 started
WARNING: child 1683, script '/home/wwwroot/default/ftp/index.php' (request: "GET /ftp/index.php") execution timed out (104.610313 sec), terminating
WARNING: child 1683 exited on signal 15 (SIGTERM) after 145.643006 seconds from start
NOTICE: child 1715 started
WARNING: child 1711, script '/home/wwwroot/default/ftp/index.php' (request: "GET /ftp/index.php") execution timed out (102.522312 sec), terminating
WARNING: child 1687, script '/home/wwwroot/default/ftp/index.php' (request: "GET /ftp/index.php") execution timed out (118.658954 sec), terminating
WARNING: child 1711 exited on signal 15 (SIGTERM) after 300.034192 seconds from start
NOTICE: child 1758 started
WARNING: child 1687 exited on signal 15 (SIGTERM) after 371.333648 seconds from start
NOTICE: child 1759 started


军哥帮忙看是什么原因?
最后总结,FTP WEB管理页面一直502,其他功能正常!

webjin 发表于 2015-7-17 00:20:54

结贴,我找到了原因,原来是新版本启用 “open_basedir”
这个安全功能是PHP防跨目录。呵呵 去掉这个功能就可以了。而且每添加一个网站,网站根目录都会多一个.user.ini 文件
里面的那行#注释掉它,或者删除那个文件,至于文件内容为什么不能修改,或者无法删除。是因为该文件使用了 chattr +i 锁定了文件。只要chattr -i 解锁。
======================另外如果是安装的apache版本的,只要把网站配置文件xxx.conf的第二行加# 来注释 比如
<VirtualHost *:80>
ServerAdmin webmaster@example.com
#php_admin_value open_basedir "/home/wwwroot/xxx.com:/tmp/:/var/tmp/:/proc/"===========================
http://lnmp.org/faq/ftpserver.html 这里注意事项有说明

[ 本帖最后由 webjin 于 2015-7-17 00:31 编辑 ]
页: [1]
查看完整版本: FTP WEB管理的问题