Symfony3 with ISPConfig3

Discussion in 'Installation/Configuration' started by snoop168, May 9, 2016.

  1. snoop168

    snoop168 New Member

    I am looking to deploy a Symfony3 application to a webhost managed by ispconfig3. The symfony folder structure holds most of the code one folder level below the web folder:
    ├─ app/
    │ ├─ config/
    │ └─ ...
    ├─ bin/
    │ └─ ...
    ├─ src/
    │ └─ ...
    ├─ tests/
    │ └─ ...
    ├─ var/
    │ ├─ cache/
    │ ├─ logs/
    │ └─ ...
    ├─ vendor/
    │ └─ ...
    └─ web/ <----- public web folder
    ├─ app.php
    └─ ...
    as shown in the structure above I need to place all the other folders right in the root folder (/var/www/clients/client#/web#/) but I cannot write or change any folders at that level including as SUDO. I have full access to the server. Is there some better way to deploy symfony? I understand there is a "private" directory but if the scripts in the "web" directory are looking for files one level lower how will they locate the files in the "private" directory?

    I've also though about placing all files in the private folder then deleting the "web" folder and creating a new symlink to the ./private/web folder so that everything is all running under the structure it expects. Will this work? Any other ideas?
  2. gbe

    gbe Member

    @snoop168, did you ever find a way to do this?
    My understanding of the intentions with Symfony is that everything except their "web" folder should go into DOCROOT/private and the contents of their "web" folder should be in DOCROOT/web.
    I found this page that shows there is a way to make almost all the Symfony folders work from other locations. But that requires modifying the application, which would revert after updates.
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You can temporarily chattr -i the /var/www/clients/client#/web#/ directory to be able to make changes to it. Maybe you could stick everything under /private/ directories, and make symlinks one level up? eg. app/ -> private/app/
  4. snoop168

    snoop168 New Member

    Yes, so I ended up removing the immutable flag on the "web#" folder and deleting the "web" folder within. I installed my symfony application into the private directory i.e. web#/private/myapp/ (app,src,web etc live here)
    I then created a symlink from the original web folder (the deleted one web#/web) to point to the ./private/myapp/web one. Then you can use symfony with all its default settings. No need to use the symfony tutorial that pertains to changing the paths.

Share This Page