LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > context for CGI script always says "access denied"

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2006, 02:40 AM
henpa henpa is offline
Member
 
Join Date: Mar 2006
Posts: 16
Default context for CGI script always says "access denied"

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
Quote:
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.
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:
Reply With Quote
  #2  
Old 03-28-2006, 09:43 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
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. :-)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
install from script? djsodom Install/Configuration 6 04-02-2007 05:18 PM
authorization realm in rails context jdan Install/Configuration 2 10-19-2006 07:11 PM
LDAP Authorization useless, fcgi Authorization broken? System Install/Configuration 4 10-18-2005 07:51 AM
Not to stop FCGI apps while reloading LSWS Roman2K Feedback/Feature Requests 4 10-12-2005 01:21 PM
1.5RC1 context xing Bug Reports 2 04-28-2004 09:27 AM


All times are GMT -7. The time now is 09:59 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.