I am using Ubuntu 14.04. I configured sample Symfony2 project using composer.
While running my sample application It is working fine for "dev" environment (ie, It is working fine for http://test.local/app_dev.php/ url).
But It is not working in "prod" environment (ie, While hitting http://test.local/ ).
I am getting 404 page not found error.
There is nothing wrong with your setup if you're using the plain symfony-standard
edition.
symfony-standard
's production environment has no routes configured by default.
So there is no /
route and therefore you get a 404 not found error.
Have a look at the default routing.yml
- it's empty.
The Hello World example-routes from AcmeDemoBundle are only found in routing_dev.yml
(which is loaded only in the dev environment) and will be removed in version 2.5.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.