CGI / Perl outside of a cgi-bin/ dir

Discussion in 'Install/Configuration' started by TomBG, Mar 21, 2009.

  1. TomBG

    TomBG New Member

    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.
  2. TomBG

    TomBG New Member

    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.
  3. mistwang

    mistwang LiteSpeed Staff

    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.
  4. TomBG

    TomBG New Member


    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.

Share This Page