I want to host multiple Symfony2 based websites under one root (server). Would it be possible to share the symfony own files? (vendors etc.). Does someone know a tutorial? Is it hard to manage? AFAIK a Symfony installation has about 600MB and I don’t want to save this in a redundant manner ..
I want to host multiple Symfony2 based websites under one root (server). Would it
Share
I certainly looks possible. A few things to remember:
Symfony/vendorsfolder contains all the Symfony related code. This can easily be shared between applications.Symfony/appfolder contains application related files like the config and cache, and shouldn’t be shared between applications.Symfony/webfolder contains the public folder from which the application will be served, and shouldn’t be shared.Symfony/srcfolder contains your bundles, and can be shared, depending on your needsSo at the very least, do the following:
webandappfolders. Keep the copies in theSymfonyfolder. AFAIK, there’s no easy way to have these folders in different locations.appfolder, edit bothapp.phpandapp_dev.php. Replace all references to theappfolder with the name of your new / second app folder.php newapp/console assets:install newappon your command line to install the bundled assets.I’m sure you can also copy the
srcfolder, although I haven’t experimented with that. Reusing your bundles is probably a good idea in any way.