Link to home
Create AccountLog in
Avatar of WestCoast_BC
WestCoast_BCFlag for Canada

asked on

Can I have multiple sites sharing the same codebase?

I have multiple sites using Coldfusion 11 and each site uses a MySQL database. Since each of my sites each use a copy of the same codebase I am wondering if there is a way to configure things so that I can have multiple websites share the same codebase. For example, www.sample.com, www.anothersite.com, test.sample.com and mysite.anothersite.com would all use the same codebase but use their own database and the URL is preserved when viewing the site.

Is there a way to configure this?

Thank you
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Where are you deploying your website?

The best option is probably to deploy it separately by domain.
What you describe is not a simple configuration/infrastructure problem, the application itself must need to be developed with that kind of usage in mind.
Avatar of WestCoast_BC

ASKER

Right now my sites are sitting on a shared server.
I was looking at this post: how to run multiple sites on same codebase in ColdFusion base on domain or subdomain

and see that they suggest the following:
<CFIF not CGI.HTTP_HOST EQ "www.example.com" AND not CGI.HTTP_HOST EQ "example.com">
       <CFSET Application.Environment = "Dev">
       ...
     <CFELSE>
       <CFSET Application.Environment = "Prod">
       ...             
     </CFIF>

Open in new window


Can I have multiple domains and subdomains all point to the same IP address and still preserve the URL that is displayed when someone is viewing the site?
But which is the application server?

Apache? NginX?...
What is the current configuration? Multiple applications per website?
Does you website support multiple tenants?
SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you everyone for all of your advice.  I will give it a try tonight.