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

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

问题描述

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

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

目前,应用在/app_dev.php中正常运行.

Currently, the application is running properly in /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天全站免登陆