nginx虚拟目录配置


location /abc {

        alias /home/abc;

        index index.php;


if (-d $request_filename){

rewrite ^/(.*)([^/])$ http://$HTTP_HOST/$1$2/ permanent;

}


        location ~ ^/abc(.+\.php)$ {

            alias /home/abc$1;

            fastcgi_pass phpfpm;

            fastcgi_param SCRIPT_FILENAME /home/abc$1;

            include fastcgi_params;

            fastcgi_intercept_errors        on;

            client_max_body_size 100m;

        }

    }


你可能感兴趣的:(nginx虚拟目录)