禁止php webshell配置
网络安全攻防之webshell安全配置
server {
    listen             80;
    listen             [::]:80;
    server_name        www.flarum.web;
    set                $base /home/_www_home/www_site/www.flarum.web/src;
    root               $base/public;
    index              index.html index.htm index.php;
    # php file deny
    location ~ .php$ {
        return 500;
    }
    location /assets/ {
        expires        7d;
        root           $base/public/;
    }
    location / {
        include        fastcgi_params;
        fastcgi_pass   docker_lnmp-8.1-fpm-1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root/index.php;
        fastcgi_param  SCRIPT_NAME /index.php;
        fastcgi_param  PATH_INFO $request_uri;
    }
}