How to enable prod?

When I am in my Symfony2 project using app_dev.php, I see my site. When I visit it using app.php, I see the Symfony2 welcome page, which is suitable for new projects.

I did not put anything in my config_dev.yml or routing_dev.yml files. I ran php app/console cache:clear . Why can't I see my project outside of development mode?

Here is my routing.yml

 _welcome: resource: "@FooBundle/Resources/config/routing.yml" 

and my routing_dev.yml

 _assetic: resource: . type: assetic _wdt: resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" prefix: /_wdt _profiler: resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" prefix: /_profiler _configurator: resource: "@SymfonyWebConfiguratorBundle/Resources/config/routing/configurator.xml" prefix: /_configurator _main: resource: routing.yml 

and FooBundle / Resources / config / routing.yml

 homepage: pattern: / defaults: { _controller: FooBundle:Default:index } (other stuff...) 
+4
source share
2 answers

Try the following:

 php app/console --env=prod cache:clear 

You can also try debugging routes with:

 php app/console --env=prod router:debug 
+12
source

Why did the controller execute the routing.yml and routing_dev.yml with the following pattern?
pattern: /

they must go to the same controller.

Please post your routing * .yml

+1
source

Source: https://habr.com/ru/post/1348171/


All Articles