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;

        }

    }


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章