.htaccess randomly not being loaded

Discussion in 'Install/Configuration' started by tehkspeed, Feb 26, 2010.

  1. tehkspeed

    tehkspeed Member

    We have an issue with Litespeed not always loading our root .htaccess file.

    When the .htaccess doesn't load, it looks in the root folder for the files, when infact they're in /folder/, there is a error.html in the root, which loads when .htaccess fails. This has caused 260,000 error.html pages today alone.

    A simple refresh fixes the issue, but obviously it's still a huge problem.

    I've opened a ticket but yet to receive a reply, so figured I'd ask on here.

    Do any of you know why litespeed might randomly decide not to load the .htaccess file?

    Many thanks in advance.

  2. mistwang

    mistwang LiteSpeed Staff

    Yes, you should use this forum for your free support.

    Which version of LSWS are you using? You should upgrade to latest.
    What in the .htaccess that tell web server to look for a file in /folder/ ?
    give us an example, URL, and location of file. You can mask the domain.
    Is there a sub-domain involved?
  3. tehkspeed

    tehkspeed Member

    Hey mistwang,

    We do have the latest version installed.

    Basically we use a forum software as our CMS. But not all of the URLs are /forum/ related.

    So we have a .htaccess in the top level, so that we can rewrite URLs to the root. So rather than /forum/folder/index.html it would simply be /folder/index.html

    The URL's are actually dynamic not static. When .htaccess fails, it loads error.html from the root. I can reproduce the error by temp renaming the .htaccess in root.

    An example: RewriteRule ^notifications/my-notifications.html /forum/index.php?autocom=themes&code=notifications [L]

    I hope that makes more sense now. I'm not the programmer btw, I just own the company and trying to find a resolve.
  4. mistwang

    mistwang LiteSpeed Staff

    Since it is a rewrite rule, you can enable Rewrite Logging by set RewriteLogLevel 9 for that vhost. If httpd.conf is used, you need to add that the <VirtualHost >
    restart LSWS. then reproduce the error, check error log for related log entries.
    Grep the log file by your IP should easily locate those log entires.

    Load firebug in firefox when you do the test, you can locate URL with 404 response and match it with the log.
  5. tehkspeed

    tehkspeed Member

    Thanks I'll try that.

    We did have some level of logging on.

    But it simply reported that the URL was not found.
  6. tehkspeed

    tehkspeed Member

    Quick update

    We are also finding stuff like this in our LS logs:

    ["APVH_Default"] - - [26/Feb/2010:13:40:57 -0500] "GET /favicon.ico HTTP/1.1" 404 389 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)"

    This DOES exist. No htaccess or rewrites involved.

    It's also happening on many random files. Does that help or just make matters more confusing?
  7. mistwang

    mistwang LiteSpeed Staff

    vhost is "APVH_Default", not your main domain vhost. Must be a bad host name.
  8. tehkspeed

    tehkspeed Member

    Sorry I don't understand. Are you just saying it's not an important error?
  9. mistwang

    mistwang LiteSpeed Staff

    That request is handled by the default vhost at /usr/local/apache/htdocs/ , because domain name in the URL is not any vhost configured, so it is handled by the default vhost. maybe the server IP address is used in the URL.
  10. tehkspeed

    tehkspeed Member

    Ok thanks, host says they've fixed that.

    We also have a random duplicate upload issue, that is present under litespeed but not apache.

    Users upload a file, say a wallpaper, and it's inserted in to the database several times creating multiple instances in the gallery.

    Under apache, despite slightly higher load, it doesn't happen.

  11. mistwang

    mistwang LiteSpeed Staff

Share This Page