cgi

Discussion in 'Install/Configuration' started by Dani, Nov 29, 2005.

  1. Dani

    Dani New Member

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

    mistwang LiteSpeed Staff

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

    mistwang LiteSpeed Staff

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

    Dani New Member

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

    mistwang LiteSpeed Staff

    Did you only dump the debug message?
    there should be a "INFO" message shows the reason for "403".
  6. Dani

    Dani New Member

    hmm INFO is set but nothing comes out.

    Enable Script = Yes
    CGI Chroot Mode = Same as server
  7. mistwang

    mistwang LiteSpeed Staff

    Is "Restrained" set to "No"?
  8. Dani

    Dani New Member

    it's set to 'yes'. should i change it..?
  9. mistwang

    mistwang LiteSpeed Staff

    Should be set to "No", as you want allow that vhost access files beyond the vhost root.
  10. Dani

    Dani New Member

    ok set it to no, still no NOTICE or INFO just a 403.. same with cpanel's /webmail and the other
  11. mistwang

    mistwang LiteSpeed Staff

    If you don't mind, PM me the login information about your server, I can take a look, could save both of us sometime.
  12. Dani

    Dani New Member

    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!

Share This Page