context for CGI script always says "access denied"

Discussion in 'Install/Configuration' started by henpa, Mar 26, 2006.

  1. henpa

    henpa New Member

    When I have context configured as:
    Code:
        <context>
          <type>cgi</type>
          <uri>/path/</uri>
          <location>/usr/local/lsws/fcgi-bin/</location>
          <accessControl>
          </accessControl>
          <addDefaultCharset>off</addDefaultCharset>
          <rewrite>
          </rewrite>
        </context>
    And if I hit for http://192.168.0.1/path/script.pl it will give me the file correctly. Good.

    But if I create a context direct to the script, like this:
    Code:
        <context>
          <type>cgi</type>
          <uri>/script.pl</uri>
          <location>/usr/local/lsws/fcgi-bin/script.pl</location>
          <accessControl>
          </accessControl>
          <addDefaultCharset>off</addDefaultCharset>
          <rewrite>
          </rewrite>
        </context>
    And if I hit for http://192.168.0.1/script.pl, it will always reply with a "403 Forbidden - Access to this resource on the server is denied!" error.

    Documentation says
    Hmm.. I've spent a long time trying to figure this out, and even tried other ways to do this, but I got no success. Log with DEBUG set as HIGH doesn't give me anything useful. Please help... :roll:
  2. mistwang

    mistwang LiteSpeed Staff

    There should not be any problem with this. I tried it with different configurations, all works.

    Have you tried using URI: /path/script.pl ? If URI=/path/ works, and script.pl pointing to the same file, I don't see any reason why it won't work. :)

Share This Page