Deploying Symfony 2.5.3 website to production server

后端 未结 4 1217
渐次进展
渐次进展 2021-01-23 17:16

I have been working on a website in development environment built on top of Symfony framework and now it is time to deploy it to live site, in development environment we run the

4条回答
  •  一向
    一向 (楼主)
    2021-01-23 17:59

    I don't know how it is done professionally because I don't use symfony, but I will tell you how I did it when I was testing on Linux.

    Let's say you have your www directory in /home/user/www/ (it doesn't really matter). I would put whole symfony directory (with all directory structure) to some other directory (let's say /home/user/applications/my-symfony-webpage - the last being your directory with symfony files structure).

    Last thing you need to do to make it work is to create a symlink which will direct from /home/user/www/ to /home/user/applications/my-symfony-webpage/web.

    It can be done with this command: ln -s /home/user/applications/my-symfony-webpage/web /home/user/www/ (I think you need to delete www directory first if it's meant just for symfony installation).

    That's my solution, I doubt it's the only one and probably not the best one. I think you can create redirects with apache to direct some domains to some directory in your file structure (in your case to web directory of course). You can look it up online.

提交回复
热议问题