Jump to content

multiple sites / shared codebase


pyroblue

Recommended Posts

hey everyone -- i searched, but to no avail -- and i have some specific questions.

 

i basically want to create a platform for dog groomers to have their site on. basically each site will have it's own images and css, but they will all use the same backend. i'd also like each site to have it's own database.

 

so, with that said...i have a few questions...

 

1) do i create a "common" directory, and then a directory for each new site?

i was thinking of having the common libraries and classes in a shared 'common' directory...then referencing those files with a "../" (for example) from each of the 'site' directories -- bad design? somtehing that would work better?

 

2) would virtual hosts be the best way to manage this?

What im thinking is that i would have "AshleysDogGrooming.com" go to one docroot, and "CarlasDogGrooming.com" go to another. Can i set variables in the apache config that could be read by PHP? If not than...

 

any ideas/suggestions?

 

Thank you -- my first post, and i'm looking forward to learning a few things...

 

*pyro*

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/130582-multiple-sites-shared-codebase/
Share on other sites

1) do i create a "common" directory, and then a directory for each new site?

 

Yeah. What Ive done with my framework is to have it residing in /usr/share/php/myframework

 

Then you simply add that path to your include_path directive (set within php.ini).

 

2) would virtual hosts be the best way to manage this?

 

Indeed it would be. Either that or use virtual_host_alias (this allows you to add new sites without and apache restart but makes logging and custom configurations more difficult).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.