Knowledgebase

need help on apache 1.3 for one site, two cgi-bin folders

Posted by surfmanjoe, 07-12-2007, 09:42 PM
my server has just one site, apache conf has such a line: and then, my cgi script may run well under the said folder, /usr/local/apache/htdocs/cgi-bin but I have another script need to be setup another cgi-bin under its own folder below htdocs folder, like, /usr/local/apache/htdocs/anotherscript/cgi-bin however, when I run the said script in browser: the browser just shows source codes, instead of running it. I am guessing something wrong in httpd.conf, may I know how to set apache httpd.conf to meet my requirement? thanks.

Posted by Patrick, 07-12-2007, 09:45 PM
Check your Apache configuration file, do you have the following line present: AddHandler cgi-script .cgi .pl I'm going to assume that it is present, since it works under another directory, but the fact that it's only showing the source code of the .cgi has me wondering...

Posted by surfmanjoe, 07-12-2007, 10:10 PM
you are right, after enabling the said line, it works. thanks very much.

Posted by foobic, 07-12-2007, 10:15 PM
There's no need to enable cgi scripts everywhere when you only want to run them in these 2 directories. Just add another ScriptAlias and another section in your httpd.conf - like what you've shown except for the different path. Then restart apache. Job done



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
thePlanet/SM down? (Views: 632)
Apache Crash (Views: 504)


Language:

Client Login

Email

Password

Remember Me

Search