在Symfony 2中将应用程序移至生产模式 [英] Moving app to production mode in Symfony 2

查看:62
本文介绍了在Symfony 2中将应用程序移至生产模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我将Symfony 2应用程序移至生产模式吗?

Can someone help me to move my Symfony 2 application into production mode?

当前,该应用程序在 /app_dev.php中正常运行

我正在谷歌搜索,但是我没有找到Symfony 2中明确的部署指南。

I'm googling, but I'm not finding a definite guide for deployment in Symfony 2.

推荐答案

还要考虑更多事情:

php app/console cache:clear --env=prod --no-debug
php app/console assets:install web_directory
php app/console assetic:dump web_directory

您可能还会遇到缓存目录的权限问题。实际上,在切换到生产模式之前,我首先要确保一切都在服务器上的开发模式下工作。如果您只获得生产模式下的空白屏幕,则将debug设置为true。当然知道如何检查错误日志。

You might also run into permission issues with the cache directory. I would actually first make sure everything works in development mode on the server before switching to production mode. And if all you get is blank screens in production mode then set debug to true. And of course know how to check your error logs.

这篇关于在Symfony 2中将应用程序移至生产模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆