title: Multi site SaaS CMS on top of Symfony2
body: <p>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:</p>
  
  <p>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.</p>
  
  <pre><code>/var/www/cust001/ -&gt; CMS customer 1
  /var/www/cust002/ -&gt; CMS customer 2
  ...
  </code></pre>
  
  <p>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 <code>/var/cms/</code> 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</p>
  
  <pre><code>cust1 -&gt; cust001.mycompany.com, alias www.customerdomain.com ...
  cust2 -&gt; cust002.mycompany.com, alias www.customer2domain.com ...
  ...
  </code></pre>
  
  <p>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.</p>
  
  <p>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?</p>