agassner
agassner

Reputation: 689

Multi site SaaS CMS on top of Symfony2

We are going to build a SaaS CMS on top of Symfony2 (please answer if you think Symfony2 is the wrong way to go). We have many customers and we want to create a CMS with following architecture:

Let's say we have 200 or more customers (websites) and every customer should share a global CMS (all custs have the newest version). In addition every customer should have their own database with the customers own data. In this case the CMS core needs a master database with the information about the customer databases etc. My approach is to build a multi site architecture where every customer has their own vHost in apache and all customers share one CMS core.

/var/www/cust001/ -> CMS customer 1
/var/www/cust002/ -> CMS customer 2
...

These folders are the public html areas where templates, css, images etc. are stored for every customer. The CMS itself isn't inside the public area, it's for example located in /var/cms/ and isn't available over apache2 server. Are in a customer's vhost symlinks to the front controller of the CMS core required? Every customer vhost should be available through some domains, like

cust1 -> cust001.mycompany.com, alias www.customerdomain.com ...
cust2 -> cust002.mycompany.com, alias www.customer2domain.com ...
...

In addition every customer should have the ability to have some Symfony2 bundles (plugins) for extending the core CMS (a webshop, guestbook...) in their vhost.

Is this approach possible to implement with Symfony2? What's the best way to route a vhost domain to front controller and select the correct database? How are dynamic routes (website page requests) in Symfony2 managed? Are there some alternative approaches?

Upvotes: 3

Views: 1353

Answers (1)

Robert Speer
Robert Speer

Reputation: 192

I think it's a good idea but smart people have made choices in both directions:

The Punk'Ave team that build the Apostrophe CMS (my CMS of choice) chose to migrate from sf1 to node.js instead of sf2 for reasons detailed in their announcement: AKBUfjzwJ">https://groups.google.com/d/msg/apostrophenow/d-g1P6chsm8/l_AKBUfjzwJ

Apostrophe does have a excellent SAAS CMS solutions that's pretty good at apostrophenow.com

HOWEVER, the EzPublish team has gone with Symfony 2, a CMS that I believe supports MultiSite or MultiTenancy, AND Drupal 8 will also be using some Sf2 components.

The Symfony 2 routing features are very robust, but I dont have specific links to answer all your low level questions.

Upvotes: 2

Related Questions