We have a fairly large e-commerce application running on apache 1.3 and mod_perl. There is a lib directory with all our libraries which also includes a library called SiteConfig.pm which contains configuration information about the site (such as database connection info, site name, site URL, various paths, etc.).
My boss told me he wants me to install the application for three more domains. I'm not a server admin nor do I know that much about the internals of mod_perl. Our "server admin" who got us set up with mod_perl to begin with recommends sharing the library directory among the 4 sites running this application. Since the configuration information is stored in a module, which is in turn kept in memory by mod_perl, I forsee problems!
We now need at least four separate configuration modules, but mod_perl needs to somehow know which one to run depending on which site is making the request. Many of the other modules
use SiteConfig; so if we made one module for each site we'd have to also copy all the modules.
We really want to keep all the modules (and other files) exactly the same except the config module and the various HTML templates because there will be scripts propogating our changes to CVS out to the four sites.
Unfortunately the guy who suggested sharing the library directory has disappeared and now I'm trying to figure out if there is a way to do this w/out copying the library directory 4 times. Any ideas?
Update: satchm0h suggested I provide more details about our apache setup. We have one apache installation running one instance of mod perl. There are multiple virtualhosts but currently only our "original" site runs the code in question. My task is to make the code run on an additional 3 domains. Preferably without running three more instances of apache. Currently our code is stored in CVS and one of my coworkers manually runs a patch on the live site roughly every two weeks which contains all our code updates. We have a separate server altogether running MySQL and we are using Apache::DBI, Apache::Session, and Apache::Registry. The code was originally (up until december) running as CGIs (very slowly until we migrated it to mod_perl). Thanks in advance.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.