I have ssi working on InMotionHosting but can not get it to work on a local Centros 7 install.
Apache version 2.4.6
The httpd -M shows that the so_module is loaded but not the mod_include.
When I tried to add mod_include I get the error:
httpd: Syntax error on line 55 of /etc/httpd/conf/httpd.conf: Can't locate API module structure
mod_include’ in file /etc/httpd/modules/mod_include.so: /etc/httpd/modules/mod_include.so: undefined symbol: mod_include’
I tried to modify the httpd.conf file:
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Still the SSI fails.
The index file is simple:
<h1>Test page</h1>
/var/www/index.html
<br/>
<!--#echo var="DATE_LOCAL" -->
<!--#include virtual="./insert.shtml" -->
What did I miss?
2
Answers
Got ssi to work on Centros 8 by setting XBitHack on.
httpd.conf:
And in the /var/www/html do:
index.htm:
Now .shtml files can be used.
Server version: Apache/2.4.37 (centos)
After a few more flops, I found this to work:
All the examples that I found showed AddHandler server-parsed .shtml. My main file is index.html and the ssi file is test.shtml.
Hope this has helped someone.