NGINX 重写条件给 HTTP 403

问题描述 投票:0回答:0

我尝试在 Symfony 4.4 项目上使用 nginx 服务器配置“lando”工具。

但是我有一个问题,所有的 URL 都不起作用 例如:

我怎样才能解决这个问题,我尝试了几种重写条件,但都没有用。

当前配置如下

location / {
        try_files $uri @rewriteapp;
    }

    location @rewriteapp {
        rewrite ^(.*)$ /index.php/$1 last;
    }

    location ~ ^/index.php(/|$) {
        include fastcgi_params;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
    }

感谢您的帮助!

docker nginx nginx-config vhosts lando
© www.soinside.com 2019 - 2024. All rights reserved.