On 3/28/21 5:59 PM, Bruce Dubbs wrote:
I'm trying to get Apache SSIs to work.  I am looking at

http://httpd.apache.org/docs/current/howto/ssi.html and
http://httpd.apache.org/docs/current/mod/mod_include.html

Testing a default apache install, I created a simple html page according to the above in the document root directory:

<html>
    <body>
       <h1>It works!</h1>
       <p>Date: <!--#echo var="DATE_LOCAL" --> </p>
    </body>
</html>

In httpd.conf I added:

LoadModule include_module /usr/lib/httpd/modules/mod_include.so

and changed the following fragment:

<Directory "/srv/www">
     #Options Indexes FollowSymLinks
     Options Indexes FollowSymLinks Includes
     AllowOverride None
     Require all granted
</Directory>

and restarted apache.

But using the browser to load the file does not execute the SSI echo command.  What am I missing?

Doesn't it always work that way.  I figured it out.  I needed to add


AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

and rename the test page with a .shtml extention.

Now, does anyone know why I shouldn't use

AddOutputFilter INCLUDES .html

and process all pages with includes?

  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to