On Monday 11 June 2012 18:33:06 Michael Orlitzky wrote:

(Apologies for lateness.)

...>8

> First of all, I see you have the mime module compiled; that's good.
> Is it enabled? You should have,
> 
>   LoadModule mime_module modules/mod_mime.so
> 
> in httpd.conf.

Yes, that's ok.

> Then, you should add or uncomment the following in 00_mod_mime.conf:
> 
>   # Filters allow you to process content before it is sent to the
>   # client
>   #
>   # To parse .shtml files for server-side includes(SSI):
>   # (You will also need to add "Includes" to the "Options"
>   # directive.)
>   AddType text/html .shtml
>   AddOutputFilter INCLUDES .shtml

Those lines are now uncommented. No other changes to that file.

> That will enable server-side includes in *.shtml files, assuming you
> also add "Includes" to the relevant "Options" directive.

# cat modules.d/00_default_settings.conf
...>8
# Added by PRH:
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
<Directory /var/www/localhost/htdocs>
        Options +SymLinksIfOwnerMatch +Includes +IncludesNoExec
</Directory>

Now, after restarting Apache its error_log shows the restart, doesn't 
report any errors. On refreshing the page display on the client, I get 
this:

[Sun Jun 24 18:38:29 2012] [warn] [client 192.168.2.6] mod_include: 
Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed

I've tried removing either +Includes or +IncludesNoExec from Options and 
restarting Apache but the error_log entry still appears, and of course 
the included file isn't (included).

So I still have something wrong. All files under /etc/apache2 are 
root:root 644 and the directories are root:root 755.

> If you need server-side includes for other types of files, it isn't
> recommended[1], but you can add additional "AddOutputFilter"
> directives for each type of file you'd like SSI to work with.

No, I haven't done that.

> [1] http://httpd.apache.org/docs/2.2/howto/ssi.html

That is indeed my working guide. Many thanks for your help so far.

-- 
Rgds
Peter

Reply via email to