nginx权限控制
1、用低权限账号运行Nginx。例www
2、在php.ini中禁用危险的函数。如:system,passthru,shell_exec,exec,popen,proc_open,chroot,scandir,chgrp,chown等,但禁止太多的函数可能对某些php程序的正常运行产生影响。
3、在php.ini中设置open_basedir,如:open_basedir = “/usr/local/webserver/nginx/html/www.xpb.cn_7da347bc1a9fd621/:/usr/local/webserver/nginx/html/viyin.cn_7da347bc1a9fd621/”
4、禁止目录遍历,各个虚拟主机用户放在不易于猜到的目录,如:www.viyin.net_7da347bc1a9fd621、viyin.cn_7da347bc1a9fd621
5、自己找一个php木马,自我测试服务器安全!