简体   繁体   English

在哪里部署symfony2应用程序

[英]Where to deploy symfony2 application

I have developed a symfony application and it's done. 我已经开发了一个symfony应用程序,并且已经完成。 It's been a couple of days and I can't figure out how to deploy this into a real apache server, when I copy it to the public_html it doesn't work assets don't load properly. 已经过了几天,我不知道如何将其部署到真正的apache服务器中,当我将其复制到public_html时,它不能正常工作,资产无法正确加载。 Can some one give me a step by step description of how to deploy it so that when I navgiate to example.com url I see my symfony application. 有人可以逐步介绍如何部署它,以便当我浏览example.com网址时可以看到我的symfony应用程序。 Thank you 谢谢

I would suggest using Capifony which provides a specialized set of tools on top of Capistrano , tailored specifically to symfony and Symfony2 projects. 我建议使用Capifony ,它在Capistrano之上提供了一套专门的工具,专门针对symfony和Symfony2项目而量身定制。 (according to the documentation ) (根据文档

The advantages of using capifony are, 使用capifony的优点是,

  • deploying is as simple as running cap deploy from your project root directory. 部署就像从项目根目录运行cap deploy一样简单。
  • It stores multiple releases. 它存储多个发行版。
  • It allows you to use SCM(s) to pull your application code down to the server. 它允许您使用SCM将您的应用程序代码下载到服务器。
  • You can configure it to run any batch command during the deployment. 您可以将其配置为在部署期间运行任何批处理命令。
  • It performs a transactional-like deployment process (if any step fails, the deployment is rolled back and the current directory points to your last release) 它执行类似事务的部署过程(如果任何步骤失败,则部署将回滚,并且当前目录指向您的最新版本)

You'll also need to troll through this part of the documentation to figure out how to get your application running under Apache . 您还需要浏览文档的 这一部分 ,以弄清楚如何使您的应用程序在Apache下运行。

If you try to deploy your application on a server, you have to configure apache. 如果尝试在服务器上部署应用程序,则必须配置apache。 The best way its to make a virtual host. 制作虚拟主机的最佳方法。

Here the documentation: 这里的文档:

http://httpd.apache.org/docs/current/en/vhosts/examples.html http://httpd.apache.org/docs/current/en/vhosts/examples.html

http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM