symfony 2 routes not found in production

家住魔仙堡 提交于 2019-12-04 05:13:34
Vasyl

First, review in console list of routes (command router:debug). If there you found your routers, then some troubles with clearing cache in my case I delete folder app/cache manually and it works.

For setting PROD environment without cache, in file app.php change to

$kernel = new AppKernel('prod', true);

Try clearing cache on prod enviroment.

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

or

active mod_rewrite in

activate the directory:  nano /etc/apache2/apache2.conf

AllowOverride None
<Directory "/var/www/html">
    AllowOverride None
</Directory>
for
<Directory "/var/www/html">
    AllowOverride All
</Directory>

http://www.dev-metal.com/enable-mod_rewrite-ubuntu-14-04-lts/
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!