Problems with server-side include (SSI) on Apache v2
Hi All:
I have a Red Hat Enterprise Linux box (v5) running Apache v2.0.
I think I have every option that I need set so that I can do SSIs, but for some reason, it does not work. I've included the contents of the files and am hoping that someone can help me out.
From httpd.conf:
LoadModule include_module modules/mod_include.so
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
<Directory /var/www/html/test>
Options Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
In my "test" directory (http://server/test -- same as path above), I have 2 simple files.
Hello! My name is Inigo Montoya!
<!--#include virtual="./include.shtml" -->
</body>
</html>
include.shtml:
<p>You killed my father. Prepare to die!
<br>
When I goto my test page, I do not get the text that is included in include.shtml. This works ok in Dreamweaver, but when uploaded to my server and run from there, it does not work. I do not see any errors in my apache logs.
I think the pages calling the includes need to be named shtml (index.shtml) the includes themselves can be named .html. At least that is what I had to do and it worked but maybe I went against a rule of best practice.
Bookmarks