Hi guys,
I'm having an interesting problem with my LiteSpeed install, and I'm not sure if it's a configuration problem or not.
The server hosts a site called 'shiftperception.com'. This site has a fair bit of content, including two instances of wordpress:
* www.shiftperception.com/blog/
* www.shiftperception.com/uts/webmedia1/
Both require mod_rewrite functionality, and each of them have their own .htaccess files. They look like this:
OK, so the problem is this. Both of these sites suffer from intermittant 404 errors. You can be browsing the site, and you might browse to a url like: http://www.shiftperception.com/uts/webmedia1/week-by-week-summary/week-3/html-tags/
and it'll return with a 404 error. If you refresh immediately, or hit 'back' in the browser and click the link again, it works perfectly!?
I turned on debug logging and have taken a snapshot of what happens. When the first request fails (and the 404 is returned), the debug log shows the following:
If I hit refresh immediately, the log shows the following:
So it works the second time. Can someone tell me what's going on here please? I have no idea what could be causing this problem.
Many thanks for your help.
OJ.
I'm having an interesting problem with my LiteSpeed install, and I'm not sure if it's a configuration problem or not.
The server hosts a site called 'shiftperception.com'. This site has a fair bit of content, including two instances of wordpress:
* www.shiftperception.com/blog/
* www.shiftperception.com/uts/webmedia1/
Both require mod_rewrite functionality, and each of them have their own .htaccess files. They look like this:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /blog/index.php [L,QSA]
</IfModule>
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /uts/webmedia1/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /uts/webmedia1/index.php [L,QSA]
</IfModule>
and it'll return with a 404 error. If you refresh immediately, or hit 'back' in the browser and click the link again, it works perfectly!?
I turned on debug logging and have taken a snapshot of what happens. When the first request fails (and the 404 is returned), the debug log shows the following:
Code:
2007-04-09 22:17:37.708 DEBUG [121.45.245.177:4992-0] HttpIOLink::handleEvents() events=1!
2007-04-09 22:17:37.708 DEBUG [121.45.245.177:4992-0] HttpConnection::onReadEx(), state: 0!
2007-04-09 22:17:37.708 DEBUG [121.45.245.177:4992-0] readToHeaderBuf().
2007-04-09 22:17:37.708 DEBUG [121.45.245.177:4992-0] Read from client: 876
2007-04-09 22:17:37.708 DEBUG [121.45.245.177:4992-0] read 876 bytes to header buffer
2007-04-09 22:17:37.708 DEBUG [121.45.245.177:4992-0] processHeader() return 0, header state: 3.
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0] readToHeaderBuf() return 0.
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] New request:
Method=[GET], URI=[/uts/webmedia1/week-by-week-summary/week-3/html-tags/],
QueryString=[]
Content Length=0
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] Find context with URI: [/], location: [/home/sites/dan/shiftperception.com/public_html/]
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] File not found [/home/sites/dan/shiftperception.com/public_html/uts/webmedia1/week-by-week-summary/week-3/html-tags/]
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] processContextPath() return 25
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] processNewReq() return 25.
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] HttpConnection::sendHttpError(),code=404 Not Found
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] HttpConnection::flush()!
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] Written to client: 581
2007-04-09 22:17:37.709 DEBUG [121.45.245.177:4992-0#shiftperception.com] HttpConnection::nextRequest()!
Code:
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0] HttpIOLink::handleEvents() events=1!
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0] HttpConnection::onReadEx(), state: 0!
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0] readToHeaderBuf().
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0] Read from client: 902
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0] read 902 bytes to header buffer
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0] processHeader() return 0, header state: 3.
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0] readToHeaderBuf() return 0.
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0#shiftperception.com] New request:
Method=[GET], URI=[/uts/webmedia1/week-by-week-summary/week-3/html-tags/],
QueryString=[]
Content Length=0
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0#shiftperception.com] Find context with URI: [/], location: [/home/sites/dan/shiftperception.com/public_html/]
2007-04-09 22:18:48.834 DEBUG [HTAccess] Updating configuration file [/home/sites/dan/shiftperception.com/public_html/.htaccess]
2007-04-09 22:18:48.834 DEBUG [HTAccess] Updating configuration file [/home/sites/dan/shiftperception.com/public_html/uts/.htaccess]
2007-04-09 22:18:48.834 DEBUG [HTAccess] Updating configuration file [/home/sites/dan/shiftperception.com/public_html/uts/webmedia1/.htaccess]
2007-04-09 22:18:48.834 DEBUG [HTAccess] No change in configuration file [/home/sites/dan/shiftperception.com/public_html/uts/webmedia1/.htaccess].
2007-04-09 22:18:48.834 DEBUG [121.45.245.177:4997-0#shiftperception.com] Find .htaccess context with URI: [/uts/webmedia1/], location: [/home/sites/dan/shiftperception.com/public_html/uts/webmedia1/]
2007-04-09 22:18:48.834 INFO [121.45.245.177:4997-0#shiftperception.com] [REWRITE] strip rewrite base: '/uts/webmedia1/' from URI: '/uts/webmedia1/week-by-week-summary/week-3/html-tags/'
2007-04-09 22:18:48.834 INFO [121.45.245.177:4997-0#shiftperception.com] [REWRITE] Rule: Match 'week-by-week-summary/week-3/html-tags/' with pattern '^(.+)$', result: 2
2007-04-09 22:18:48.835 INFO [121.45.245.177:4997-0#shiftperception.com] [REWRITE] stat( /home/sites/dan/shiftperception.com/public_html/uts/webmedia1/week-by-week-summary/week-3/html-tags/ ) failed
2007-04-09 22:18:48.835 INFO [121.45.245.177:4997-0#shiftperception.com] [REWRITE] stat( /home/sites/dan/shiftperception.com/public_html/uts/webmedia1/week-by-week-summary/week-3/html-tags/ ) failed
2007-04-09 22:18:48.835 INFO [121.45.245.177:4997-0#shiftperception.com] [REWRITE] Source URI: 'week-by-week-summary/week-3/html-tags/' => Result URI: '/uts/webmedia1/index.php'
2007-04-09 22:18:48.835 INFO [121.45.245.177:4997-0#shiftperception.com] [REWRITE] Last Rule, stop!
2007-04-09 22:18:48.835 DEBUG [121.45.245.177:4997-0#shiftperception.com] Find handler [shiftperception.com_lsphp] for [.php]
2007-04-09 22:18:48.835 DEBUG [121.45.245.177:4997-0#shiftperception.com] processContextPath() return 0
2007-04-09 22:18:48.835 DEBUG [121.45.245.177:4997-0#shiftperception.com] run lsapi processor.
2007-04-09 22:18:48.835 DEBUG [uds://tmp/lshttpd/shiftperception.com_lsphp.sock] request [121.45.245.177:4997-0#shiftperception.com:lsapi] is assigned with connection!
.
.
.
(this carries on while the rest of the page is loaded)
Many thanks for your help.
OJ.