Discussion Locked

Server-side Includes not working.

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have Apache 1.3.14 running on Caldera eServer. I have the verified (I think) that my directives are correct, with "AddHandler server-parsed shtml" and "Options Includes". But, when I view the site, index.shtml, it only shows the main page and not the included pages, nav_left.inc.

What am I missing?

7 replies

by macwizard

You have to restart the web server for this to take effect. Also, note that the SSI commands in the web page are a little tricky. For instance, in the following

there are two and only two spaces, the # is required, and I used virtual instead of file because "include file" only works if the two files are in the same directory.

This is an unbelievably useful feature, so don't give up until you've got it working!

by shanghai sam

I have the SSI command exactly as you pointed out. Still does not include my header, footer, and side bar.

Thanks for trying.

by joe prochazka

First off i think the problem is inn your Options statement it should be Options +Includes (with the + sign in front of Includes, not Options Includes. Try that first and see if that works. If not check through the following:

Make sure mod_include installed:
look for the following lines and make sure they are uncommented or present. If they are not present then you may need to add mod_include to your apache server.

AddModule mod_include.c
and
LoadModule includes_module modules/mod_include.so

look also for the following lines and make sure they are uncommented also

AddType text/html .shtml
AddHandler server-parsed .shtml

next in the virtual host entry in the apache config add a entry like so.

AllowOverride none
Options +Includes
Order allow,deny
Allow from all

This will allow the use of ssi and .htaccess for that directory.

for further refferance on mod_include check out this page.

http://httpd.apache.org/docs/mod/mod_include.html

This discussion is closed to new replies.