Have a set a cgi scripts shared by multiple domains
Posted
by
rpat
on Server Fault
See other posts from Server Fault
or by rpat
Published on 2011-01-02T07:39:37Z
Indexed on
2011/01/02
7:55 UTC
Read the original article
Hit count: 222
apache
Goal: Have multiple domains share a set of cgi(perl) scripts
Environment: Apache 2.0 on a dedicated Cent OS server. (Apache configuration files generated by cPanel)
I have dozens of domains on the dedicated server. The domains set up by cPanel under VirtualHost section. I have almost no knowledge of Apache. Most of what I do is taken care of by cPanel.
I would like to put a set of scripts under one directory (perhaps under / or /opt ) and for each of the domains, under the individual cgi-bin, I would like to create a symbolic link to this common directory. This way I am hoping to avoid having to keep a copy of scripts for every domain.
Since Apache config files are generated by cPanel, I would not like to manually make changes to those. Beside, I could mess things up. I see that cPanel recommends use of include files rather than changing the httpd.conf
Perhaps I need to have the following of symbolic links enabled in the cgi-bin directory and allow the web server user execute the scripts not owned by it.
May be I am making things more complicated than they are. I would be glad to use any other means to achieve my goal. Thanks in advance for your help.
*I asked this on stackoverflow and some one suggested that I could ask this on serverfault.
© Server Fault or respective owner