Paths and symbolic links *nix/Apache/Perl

greglwhite used Ask the Experts™
I have a group of clients running a perl CGI application on my server.  90% of the code is the same across the installations.  My directory structure is like this:

The cgi directory holds the application, and the conf directory has specific client settings, logo names, feature settings, db tables and such.
I would like to have a common cgi directory that contains the common code for all clients, my difficulty is getting the common cgi files to read the correct conf file for the client.  I tried initially to symbolic link the common cgi into each client directory,
../commoncgi (actual directory with cgi files)
../client1/commoncgi (symbolic link)
then tried to access the conf file by reading ../conf but the system went down the commoncgi path, not the symbolic link path.

I know I can accomplish what I want to do by rewriting some of the code, but the application is 30+ files, I was really hoping there was an Apache configuration file trick or a *nix trick that would help me accomplish this.

Does anyone have any ideas that would help me do this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2015
Use hard links. Apache does not go outside webroot with relative paths.
I'd also recommend hard links, something like

mkdir /commoncgi
mkdir /client1/cgi
mkdir /client1/cgi
ln /commoncgi /client1/cgi/commoncgi
ln /commoncgi /client2/cgi/commoncgi

(and adapt your CGIs according this directory tree)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial