简体   繁体   English

Symfony4 WebProfiler 404

[英]Symfony4 webprofiler 404

I've just setted up a fresh Symfony 4 project but when I navigate to the "public" folder the webprofiler shows up with the following message: 我刚刚设置了一个新的Symfony 4项目,但是当我导航到“ public”文件夹时,webprofiler会显示以下消息:

An error occurred while loading the web debug toolbar. Open the web profiler.

When I click on "Open the web profiler" I get the following error: 当我单击“打开Web分析器”时,出现以下错误:

Error 404, Object not found

The path which is not found is in this case: 在这种情况下找不到的路径是:

http://localhost/test-project/public/_profiler/4d2f65

Could anyone help me fix this issue? 谁能帮我解决这个问题?

If you are setting up a Symfony4/Flex app from scratch, it might not have the profiler installed. 如果要从头开始设置Symfony4 / Flex应用程序,则可能未安装探查器。

composer require profiler --dev

You may also need to follow the webserver-config to enable mod_rewrite in Apache, or the equivalent in Nginx. 您可能还需要遵循webserver-config才能在Apache或Nginx中启用mod_rewrite。

Test it with a server. 用服务器对其进行测试。

php -S localhost:8000 -t public/

After that navigate to: 之后,导航至:

http://localhost:8000/_profiler HTTP://本地主机:8000 / _profiler

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM