Package: libapache2-mod-log-sql
Version: 1.100-14
Severity: normal

I called a non-existent page on my server and expected an entry with
status=404.

The apache error log tells me:
nat-wh-hadi.rz.uni-karlsruhe.de - - [22/Jan/2011:15:54:44 +0000] "GET
/thisdoesnotexist.html HTTP/1.1" 404 639 "-" "Mozilla/5.0 (X11; U; Linux
x86_64; de; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13"

But in the database I have:
mysql> select request_uri, status from accesslog where request_uri
='/thisdoesnotexist.html';
+------------------------+--------+
| request_uri            | status |
+------------------------+--------+
| /thisdoesnotexist.html |    200 | 
+------------------------+--------+

As far as I can see, this happens when using typo3 with mod_rewrite enable
(to get typo3 realurl extension to work).

I have told typo3 to throw an 404 error if a page is not found in
localconf.php:
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '1';
$TYPO3_CONF_VARS['FE']['pageNotFound_handling_statheader'] = 'HTTP/1.1 404
Not Found';

However this only works great in the apache logs but not in mod-log. The
status should NEVER be different.

I think it has to do with mod_rewrite, because in the following case it
works great:
- create a php file with 404 error:
<?php
header("HTTP/1.0 404 Not Found");
- get this file with a browser
=> the database table contains:
mysql> select request_uri, status from accesslog where request_uri
='/fileadmin/notfound.php';
+-------------------------+--------+
| request_uri             | status |
+-------------------------+--------+
| /fileadmin/notfound.php |    404 | 
+-------------------------+--------+

I'm running debian with all updates installed.

my .htaccess for mod_rewrite looks like this:

RewriteEngine On
RewriteRule ^sitemap\.xml$ ./?eID=dd_googlesitemap [L]
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php

-- System Information:
Debian Release: 5.0.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.9-023stab052.4-smp (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libapache2-mod-log-sql depends on:
ii  apache2-mpm-prefork      2.2.9-10+lenny9 Apache HTTP Server - traditional n
ii  libc6                    2.7-18lenny7    GNU C Library: Shared libraries

Versions of packages libapache2-mod-log-sql recommends:
ii  perl                     5.10.0-19lenny2 Larry Wall's Practical Extraction 

libapache2-mod-log-sql suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to