Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable prod?

Tags:

symfony

When I visit my Symfony2 project using app_dev.php, I see my site. When I visit it using app.php, I see the Symfony2 Welcome page that comes up for new projects.

I haven't put anything in my config_dev.yml or routing_dev.yml files. I've run 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...)
like image 839
James Avatar asked Dec 13 '22 14:12

James


2 Answers

Try running this:

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

Also you could try debugging routes with:

php app/console --env=prod router:debug
like image 80
PAStheLoD Avatar answered Dec 17 '22 05:12

PAStheLoD


To which controller did routing.yml and routing_dev.yml route with the following pattern?
pattern: /

they should route to the same controller.

Please post your routing*.yml

like image 20
mrohnstock Avatar answered Dec 17 '22 05:12

mrohnstock