From: Martin Liddle on
Please can someone put me out of my misery. I have come back to this
problem several times over the last couple of weeks and have Googled
extensively but can't find the solution.

One of our applications uses a web interface for control purposes and
amongst other things uses a server side include to display a simple
ASCII text file of errors. This used to work at RedHat 9 but the server
has been updated several times recently and is currently running Fedora
8 (httpd-2.2.8-1.fc8). The httpd.conf is unchanged from the Fedorea
default and has for the DocumentRoot directory an

Options Includes Indexes FollowSymLinks

and later on there is an

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

A subdirectory below the document root has the .shtml file and the
critical line is (I think):

<!--#include virtual="./errors.txt" -->

errors.txt is present and readable. What am I doing wrong or how do I
get some debugging information?
--
Martin Liddle, Tynemouth Computer Services, 3 Kentmere Way,
Staveley, Chesterfield, Derbyshire, S43 3TW.
Web site: <http://www.tynecomp.co.uk>.
From: Martin Gregorie on
On Sat, 19 Apr 2008 22:27:37 +0100, Martin Liddle wrote:

> Please can someone put me out of my misery. I have come back to this
> problem several times over the last couple of weeks and have Googled
> extensively but can't find the solution.
>
Apache 2.2.8 uses some additional access control files that were absent
from the version installed under Fedora 7. They live in
/etc/httpd/modsecurity.d.

They bit me because they override the "Options Indexes" statement in
<directory> declarations, so they could conceivably be causing your
problem. Took me much longer than it should have to find and fix the
problem because initially I wrongly blamed SELinux.

Before you ask, no I can't find any trace of these files in the Apache 2.2
documentation or of the SecRule directive they use.


--
martin@ | Martin Gregorie
gregorie. |
org | Zappa fan & glider pilot


From: Will Kemp on
On Sat, 19 Apr 2008 22:27:37 +0100, Martin Liddle wrote:

> Please can someone put me out of my misery. I have come back to this
> problem several times over the last couple of weeks and have Googled
> extensively but can't find the solution.
>
> One of our applications uses a web interface for control purposes and
> amongst other things uses a server side include to display a simple
> ASCII text file of errors. This used to work at RedHat 9 but the server
> has been updated several times recently and is currently running Fedora
> 8 (httpd-2.2.8-1.fc8). The httpd.conf is unchanged from the Fedorea
> default and has for the DocumentRoot directory an
>
> Options Includes Indexes FollowSymLinks
>
> and later on there is an
>
> AddType text/html .shtml
> AddOutputFilter INCLUDES .shtml
>
> A subdirectory below the document root has the .shtml file and the
> critical line is (I think):
>
> <!--#include virtual="./errors.txt" -->
>
> errors.txt is present and readable. What am I doing wrong or how do I
> get some debugging information?

Have you added 'Includes' to the options directive for the server root
directory in httpd.conf? The default config doesn't include that - you
have to do it manually, or includes won't work.


--
http://SnapAndScribble.com/will

From: Will Kemp on
On Sun, 20 Apr 2008 13:45:03 +0000, Will Kemp wrote:

> On Sat, 19 Apr 2008 22:27:37 +0100, Martin Liddle wrote:
>
>> Please can someone put me out of my misery. I have come back to this
>> problem several times over the last couple of weeks and have Googled
>> extensively but can't find the solution.
>>
>> One of our applications uses a web interface for control purposes and
>> amongst other things uses a server side include to display a simple
>> ASCII text file of errors. This used to work at RedHat 9 but the
>> server has been updated several times recently and is currently running
>> Fedora 8 (httpd-2.2.8-1.fc8). The httpd.conf is unchanged from the
>> Fedorea default and has for the DocumentRoot directory an
>>
>> Options Includes Indexes FollowSymLinks
>>
>> and later on there is an
>>
>> AddType text/html .shtml
>> AddOutputFilter INCLUDES .shtml
>>
>> A subdirectory below the document root has the .shtml file and the
>> critical line is (I think):
>>
>> <!--#include virtual="./errors.txt" -->
>>
>> errors.txt is present and readable. What am I doing wrong or how do I
>> get some debugging information?
>
> Have you added 'Includes' to the options directive for the server root
> directory in httpd.conf? The default config doesn't include that - you
> have to do it manually, or includes won't work.

Oops! I didn't notice you said that was already there. It wasn't there in
my default Fedora 8 config (httpd-2.2.8-1.fc8.x86_64.rpm)...



--
http://SnapAndScribble.com/will

From: Nick Kew on
On Sun, 20 Apr 2008 13:49:55 GMT
Will Kemp <Will(a)xxxx.Swaggie.net> wrote:

> > Have you added 'Includes' to the options directive for the server
> > root directory in httpd.conf? The default config doesn't include
> > that - you have to do it manually, or includes won't work.
>
> Oops! I didn't notice you said that was already there. It wasn't
> there in my default Fedora 8 config (httpd-2.2.8-1.fc8.x86_64.rpm)...

You may well have been right first time. It's not clear from what's
posted whether the Options posted applies to the .shtml files in
question. Indeed, anything there could be overridden somewhere else
in the config.

Only the OP's error log knows what's wrong.

--
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/