Nginx 配置二级虚拟目录访问 Laravel 11.x 重写

Nginx 配置二级虚拟目录访问 Laravel 11.x 重写

# 此处配置二级目录站点
location  /ddyyc{
        alias   /www/web/xxxx/public;
        index index.html index.php;
        try_files $uri $uri/ /index.php?$query_string;

        location ~ .php$ {
                if (!-f $request_filename) {
                        return 404;
                }
                fastcgi_pass unix:/run/php-fpm/www.sock;
                fastcgi_index       index.php;
                fastcgi_param       SCRIPT_FILENAME $request_filename;
                include             fastcgi_params;
        }

}

Nginx 配置二级虚拟目录访问 Laravel 11.x 重写