[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Globally Accessible CGI's



The Reverend asked....

>Its interesting that the installation of awstats  or indeed   the webmail
>package makes it available to any site.  How is this done?  I.e.  How can I
>make one installation of a cgi script in a folder and have it accessible to
>all ???

Hi Leonard,
my office PC took a nose dive and so I missed the mail
for a few days, if you already have an answer, oh well :)

I use this process quite a bit, this is how I setup my
RAQ2 to provide global domain cgis.
You may have to locate the files I mention if you are
not using a RAQ2.

To set it up is a three step process.

Let's assume you want the global cgis to be located in
a dir of /cgi-scripts
ie. http://host.anysite.tld/cgi-scripts/somecgi.cgi

1. Edit your srm.conf file
(/etc/httpd/conf/srm.conf)
look for the following line

Alias /icons/ /usr/admserv/icons/

Below that add an Alias line similar to the example below.
(note that this is on a RAQ2, your home directory may be different)
Alias /cgi-scripts/ /home/sites/home/web/cgi-scripts/

2. Add the cgi-scripts dir to the /home/web directory

3. put a script in the /home/sites/home/web/cgi-scripts
and set its permissions.

I'm not sure if you have to restart the httpd (or anything else)
as it is quite a while since I added this feature to my system.

You should then be able to access that script from anywhere
by going to http://oneofyourdomains/cgi-scripts/thescriptname

Note. Make sure the cgi is accessing the correct directory if
it is accessing any files (data etc.)

Paul

-- ASI developers of ourfaqsite.com