cgi

Dani

Well-Known Member
#1
Hi,

I'm converting from apache to litespeed all the way but having some troubles with cpanel.

I would like to convert:
>> ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
into litespeed.

I've defined a CGI context the script alias like so:
URI /cpanel
Path /usr/local/cpanel/cgi-sys/redirect.cgi

and after I restart the server and goto /cpanel I get:

403 Forbidden
Access to this resource on the server is denied!

thanks
 

mistwang

LiteSpeed Staff
#2
The best way to debug this is to turn on debug logging by setting "Debug level" to "HIGH", then check lsws/logs/error.log

Make sure that permission of the CGI script has been set properly, virutal host has not been restrained to its vhost root, script has been enabled.
 

mistwang

LiteSpeed Staff
#3
If the server is in product, it is not recommended to turn on the debug logging though. Anyway, the error.log should log something helpful when 403 happened without debug logging.
 

Dani

Well-Known Member
#4
debug:

2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] New request:
Method=[GET], URI=[/cpanel],
QueryString=[]
Content Length=0
2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] Find context with URI: [/cpanel], location: [/usr/local/cpanel/cgi-sys/redirect.cgi]
2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] processContextPath() return 24
2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] processNewReq() return 24.
2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] readToHeaderBuf() return 24.
2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] HttpConnection::sendHttpError(),code=403 Forbidden
2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] HttpConnection::flush()!
2005-11-29 21:53:38.370 [DEBUG] [myip:47010-0#www.mysite.com] Written to client: 572


owner of the file is set to the one as in the lswl config...
 

Dani

Well-Known Member
#12
for those who want to know what fixed the problem here it goes:

Change the setting "Follow Symbolic Link" from "No" to "Yes" and you're set to go with the cpanel features in litespeed!
 
Top