gpt4 book ai didi

Symfony 2 : 404 Not Found Error when tryes to open/app_dev. PHP

转载 作者:行者123 更新时间:2023-12-02 01:16:47 24 4
gpt4 key购买 nike

尝试打开时收到此错误消息

/app_dev.php

An error occurred while loading the web debug toolbar (404: Not Found).

Do you want to open the profiler?

当我单击“确定”时,我收到错误:

app_dev.php/_profiler/5053258a822e1

404 Not found

我正在使用nginx

非常感谢您的帮助。

编辑:这是错误日志:

[error] 18369#0: *9 open() "/var/www/Symfony/web/app_dev.php/_wdt/5056f875afc98" failed (20: Not a directory), client: 127.0.0.1, server: symfony, request: "GET /app_dev.php/_wdt/5056f875afc98 HTTP/1.1", host: "symfony", referrer: "http://symfony/app_dev.php"
[error] 18369#0: *9 open() "/var/www/Symfony/web/404" failed (2: No such file or directory), client: 127.0.0.1, server: symfony, request: "GET /app_dev.php/_wdt/5056f875afc98 HTTP/1.1", host: "symfony", referrer: "http://symfony/app_dev.php"

编辑2:

当我尝试访问 app_dev.php 时,页面会打开,但没有工具栏,当我尝试使用 app_dev.php/时,我得到

**Oops! An Error Occurred
The server returned a "404 Not Found".
Something is broken. Please e-mail us at [email] and let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. **

错误。

最佳答案

我知道这并不完全是你所问的,但可能会帮助 future 搜索这个问题的人,就像@yvoyer建议的那样,我的问题也是尾部斜杠,我的服务器使用了nginx和fpm,并且在nginx//中确实如此不是 euqal/,所以我必须对我的虚拟主机配置进行一些修复,之后工作正常。我会将配置粘贴给需要的人,或者建议更好的配置。

    location / {
try_files $uri @pass_to_symfony;
}

location ~ /app_dev.php/ {
try_files $uri @pass_to_symfony_dev;
}

location @pass_to_symfony{
rewrite ^ /app.php?$request_uri last;
}

location @pass_to_symfony_dev{
rewrite ^ /app_dev.php?$request_uri last;
}

location ~ ^/app(_dev)?\.php($|/) {
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock; # replace with your sock path
}

关于Symfony 2 : 404 Not Found Error when tryes to open/app_dev. PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12424864/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com