CGI / Perl outside of a cgi-bin/ dir

TomBG

Active Member
#1
How do I get CGI/Perl to execute without a 503 error, outside of a cgi-bin/ directory using Apache configs? I have a script alias defined for /cgi-bin/ but that never stopped it from running anywhere in the virtualhost directory in Apache.
 

TomBG

Active Member
#2
Do I have to put a ScriptAlias for / in the config? This is the current config:

ScriptAlias /cgi-bin/ /htdocs/users/<username>/<domain>/cgi-bin/

Would something like this be the correct way to get this working? It does work, but I'm not sure if this is the best idea.

ScriptAlias / /htdocs/users/<username>/<domain>/

Please advise.
 

mistwang

LiteSpeed Staff
#3
You probably do not want to ScriptAlias for '/'.
You can use "AddHandler cgi-script .pl .cgi ...".
In other words, do whatever you need to do like with Apache.
 

TomBG

Active Member
#4
You probably do not want to ScriptAlias for '/'.
You can use "AddHandler cgi-script .pl .cgi ...".
In other words, do whatever you need to do like with Apache.

Ah yes. That worked great. Thanks. It's been a while since I had to change anything in our Apache configs. We've been running 1.3.x since forever.
 
Top