pyroblue Posted October 29, 2008 Share Posted October 29, 2008 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 More sharing options...
trq Posted October 29, 2008 Share Posted October 29, 2008 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). Link to comment https://forums.phpfreaks.com/topic/130582-multiple-sites-shared-codebase/#findComment-677562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.