You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by t s <ke...@gmail.com> on 2008/01/11 00:48:24 UTC

[users@httpd] odd/spurious error_log entries with ScriptAlias and Location directives

Hi,

I have the following problem. Start with a stock apache 2.2.6 install
on generic linux (appears to also happen with apache 2.0.61)

Add this section to the end of the httpd.conf file

<Location />
 Order deny,allow
 deny from all
</Location>

ScriptAlias /testme /usr/local/httpd/cgi-bin/testme.pl

<Location /testme>
Order allow,deny
 allow from all
</Location>


No other modification to the default config files (setting ServerRoot
and ServerName doesn't make a difference)

A request to http://localhost/testme/foo successfully executes
testme.pl with foo in the PATH_INFO,
acces_log show status 200:

127.0.0.1 - - [10/Jan/2008:12:20:18 -0700] "GET /testme/foo HTTP/1.1" 200 29

but the error_log file contains an entry

[Thu Jan 10 12:20:18 2008] [error] [client 127.0.0.1] client denied by
server configuration: /usr/local/apache2/htdocs/foo

which doesn't make sense. Note that the cgi script is successfully
executed and returns what it is supposed to return.

Note that Location directives using handlers don't have the same problem, e.g.
<Location /status>
SetHandler server-status
Order allow,deny
allow from all
</Location>

works just fine.


Why is this error_log entry generated for each request to the script
defined in ScriptAlias?
Thanks
T.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] odd/spurious error_log entries with ScriptAlias and Location directives

Posted by t s <ke...@gmail.com>.
no, there are no 403 in the access log. the two lines I quoted (one
for error_log, one for access_log) is all that is logged for an access
to the scriptaliased location. there is no indication at the client
that something may be wrong, the client sees the expected result.

access_log: 127.0.0.1 - - [10/Jan/2008:12:20:18 -0700] "GET
/testme/foo HTTP/1.1" 200 29
error_log: [Thu Jan 10 12:20:18 2008] [error] [client 127.0.0.1]
client denied by server configuration: /usr/local/apache2/htdocs/foo

note also that GET /testme/foo gives error related to
<SERVERROOT>/htdocs/foo even though there is no such file and no such
access

testme.pl is a simple hello script

> cat cgi-bin/testme.pl
#!/usr/bin/perl
print "Content-Type: text/html\r\n\r\n";
print "<html> <h1>hello</h1></html>\n";

We have verified this problem on apache 2.0.61, and 2.2.6 on various
linux machines and more or less exhaustively customized apache
installations. I boiled it down to the simple example in the original
post, which should be easily reproducible for anyone willing to look
at it.

The error appears to be harmless but for clogging the log and wasting cycles.
T.

On Jan 11, 2008 7:50 AM, Krist van Besien <kr...@gmail.com> wrote:
> On Jan 11, 2008 12:48 AM, t s <ke...@gmail.com> wrote:
>
> > Why is this error_log entry generated for each request to the script
> > defined in ScriptAlias?
>
> What does the access log say? There ought to be requests with status
> code 403 somewhere in there.
>
> Krist
>
> --
> krist.vanbesien@gmail.com
> krist@vanbesien.org
> Bremgarten b. Bern, Switzerland
> --
> A: It reverses the normal flow of conversation.
> Q: What's wrong with top-posting?
> A: Top-posting.
> Q: What's the biggest scourge on plain text email discussions?
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] odd/spurious error_log entries with ScriptAlias and Location directives

Posted by Krist van Besien <kr...@gmail.com>.
On Jan 11, 2008 12:48 AM, t s <ke...@gmail.com> wrote:

> Why is this error_log entry generated for each request to the script
> defined in ScriptAlias?

What does the access log say? There ought to be requests with status
code 403 somewhere in there.

Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org