userdir 500 error

Discussion in 'General' started by Tony, Jan 5, 2009.

  1. Tony

    Tony Member

    I'm having an issue with the userdir feature not working it's displaying a 500 internal server error. This happens with 3.3.24 and 4.0b3. I turned on full debug logging and I received this:

    Code:
    2009-01-05 00:16:00.387 [DEBUG] [y.y.y.y:80] New connection from x.x.x.x:62912.
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0] HttpIOLink::handleEvents() events=1!
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0] HttpConnection::onReadEx(), state: 0!
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0] readToHeaderBuf(). 
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0] Read from client: 419
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0] read 419 bytes to header buffer
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0] processHeader() return 0, header state: 3. 
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0] readToHeaderBuf() return 0. 
    2009-01-05 00:16:00.387 [NOTICE] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Content len: 0, Request line: 
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Find context with URI: [/], location: [/usr/local/apache/htdocs/]
    2009-01-05 00:16:00.387 [ERROR] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] detect loop redirection.
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] processContext() return 46
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] processNewReq() return 46. 
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] HttpConnection::sendHttpError(),code=500 Internal Server Error
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] redirect to: 
    2009-01-05 00:16:00.387 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Find context with URI: [/], location: [/usr/local/apache/htdocs/]
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Find handler [ssi] for [.shtml]
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] processContextPath() return 0
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] HttpIOLink::continueWrite()...
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] write resumed!
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] HttpIOLink::handleEvents() events=4!
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] HttpIOLink::suspendWrite()...
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] redirect to: 
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Find context with URI: [/], location: [/usr/local/apache/htdocs/]
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Find handler [ssi] for [.shtml]
    2009-01-05 00:16:00.388 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] processContextPath() return 0
    2009-01-05 00:16:00.389 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Written to client: 2335
    2009-01-05 00:16:00.389 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] writeRespBody() return 2175
    2009-01-05 00:16:00.389 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] HttpConnection::flush()!
    2009-01-05 00:16:00.389 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] HttpConnection::nextRequest()!
    2009-01-05 00:16:00.389 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Non-KeepAlive, CLOSING!
    2009-01-05 00:16:00.389 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Shutting down out-bound socket ...
    2009-01-05 00:16:00.448 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] HttpIOLink::handleEvents() events=17!
    2009-01-05 00:16:00.448 [DEBUG] [x.x.x.x:62912-0#APVH_y.y.y.y_hostname.domain.com] Close socket ...
    
  2. Tony

    Tony Member

    Figured it out. cPanel added "UserDir public_html" to the httpd.conf which causes it to blow up.
  3. Tony

    Tony Member

    Worked for one machine however others it did not. With those I now get a 404 not found and the reason being it's doing:

    Not really sure on that one I didn't touch any of the machines to add the support in but one works. So any suggestions?
  4. mistwang

    mistwang LiteSpeed Staff

    Which version of Apache is used? Have you customized the httpd.conf template?
    "UserDir public_html" should be in httpd.conf, the cause of 500 error is

    Code:
    detect loop redirection.
    Need to check the original URL and the target URL. LSWS should do an internal redirect from "http://ip/~user/..." to "http://user_domain/..."
  5. Tony

    Tony Member

    No changes to httpd.conf as far as I know. Removing the UserDir public_html fixed the 500 on the machines. After doing so one machine I was able to use ~user to access the users folder but others I am not as I get a 404 error. The issue now is http://ip/~user on other machines it does not send it to the /home/user/www folder instead to /usr/local/apache/htdocs
  6. mistwang

    mistwang LiteSpeed Staff

    Maybe the user domain has a dedicate IP? If yes, try its own IP instead of the global shared IP. This optimization was added to reduce memory usage, maybe should not do that.
  7. Tony

    Tony Member

    Okay that explains it all now.

    It had to go through the actual shared IP the user was on. Now what's interesting here is I have a machine where that is not the case. What we've always done is given the user the servers main ip as the location to get to ~user. The reason being most systems for setting up accounts don't have the smarts to determine the IP the user was actually put on. So they just give the user http://mainIP/~username .
  8. mistwang

    mistwang LiteSpeed Staff

    mainIP should work with latest 4.0b3 build now.

Share This Page