最近服务器被挂马,被***挂了小马(php文件)在p_w_picpath和p_w_picpaths目录下面。在没有清楚***程序之前,先让nginx 在几个没有php文件的目录里面禁止解析php文件,配置如下

php为fastcgi模式

    location ~ ^/(p_w_picpath|p_w_picpaths)/.*\.(php|php5)$

{

deny all;

}

location ~ .*\.(php|php5)?$

    {

      fastcgi_pass  127.0.0.1:9000;

      fastcgi_index index.php;

      include fcgi.conf;