Apache2 httpd on mac os x: Server-side includes not working

Discussion in 'Apache' started by Kevin Iga, Feb 19, 2017.

  1. #1
    I'm upgrading my apache2 httpd server from 2.2.14 to 2.4.25. I installed it, and it works, except for one issue: SSI (server-side includes) used to work under the old version, but do not work any longer under the new version.

    I am running Mac OS 10.5.8 on an old Mac Mini.

    My httpd.conf file includes lines like these:

    DocumentRoot "/Library/WebServer/Documents"
    <Directory "/Library/WebServer/Documents">
    Options Indexes FollowSymLinks Includes
    AllowOverride None
    Require all granted
    </Directory>

    #then much later:

    <IfModule mime_module>
    AddType text/html .shtml
    AddType text/html .html
    AddHandler server-parsed .shtml
    AddHandler server-parsed .html
    AddOutputFilter INCLUDES .shtml
    AddOutputFilter INCLUDES .html
    #Note: I have been adding and deleting lines like these with no effect but this is what it looks like at its maximum
    </IfModule>

    Note: I know that it is reading this httpd.conf because I used this to change the Document Root directory, and sometimes when I have a typo, httpd doesn't launch.

    logs/error_log has entries like this:
    [Sun Feb 19 12:58:01... 2017] [core:error] [pid: ...] [client ... ] AH00082: an unknown filter was not added: includes

    The webpage in question starts with

    <!--#include file="Includes/top.html" -->

    and this is ignored. Just to be sure, I added the line

    blah <!--#echo var="DATE_LOCAL" -->

    which added "blah" to the webpage but not the date.

    I used cat to put together Includes/top.html with my webpage and the resulting webpage looks "right" : i.e. as it did when I was running the old server and server-side includes were working.

    I googled various things but have not found other people with this problem. Any help would be appreciated. Thank you.
     
    Kevin Iga, Feb 19, 2017 IP