When I have context configured as:
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:
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:
Code:
<context>
<type>cgi</type>
<uri>/path/</uri>
<location>/usr/local/lsws/fcgi-bin/</location>
<accessControl>
</accessControl>
<addDefaultCharset>off</addDefaultCharset>
<rewrite>
</rewrite>
</context>
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>
Documentation says
If only a specific script is needed in that directory, it is recommended to create a CGI context for that script only. In this case, path and URI need not be a directory. For e.g., path can be ~/myapp/myscript.pl, URI can be /myapp/myscript.pl. All other files will not be served as CGI.