I have a Symfony2 core, which is used for domain A and domain B. But, if I update the core, I need to update two times, because I don’t know how to configure only one core, with multiple domains with theirs configs/databases.
Suggestions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Make a copy of the “web” directory into the “public_html” folder on each domain (assuming you are running Apache on Linux)
This “web” directory contains the front controllers of your site (app.php and app_dev.php), locate them and edit them on your favorite text editor. Locate this lines:
and change the route to the actual relative path where your core is located. It could be something like this:
This is flexible, and can be organized as you like, but make sure this two lines have the correct path
Keep in mind that all the assets (JS, CSS, images …) you include into your HTML are relative to the front controller location, so you will need to link them using the full url of the domain name where they reside or copy them also to the B domain or use assetic
At the end you will have something like:
Now you should have 2 entry points for your application. You can even put different CSS and images on each to give them different aspect.