General discussion

Locked

Server-side Includes not working.

By dburton ·
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?

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Server-side Includes not working.

by MacWizard In reply to Server-side Includes not ...

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

<!--#include virtual="/header.html" -->

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!

Collapse -

Server-side Includes not working.

by Shanghai Sam In reply to Server-side Includes not ...

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

Thanks for trying.

Collapse -

Server-side Includes not working.

by Joe Prochazka In reply to Server-side Includes not ...

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 <Directory> entry like so.

<Directory "/users/www/root/">
AllowOverride none
Options +Includes
Order allow,deny
Allow from all
</Directory>

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

Collapse -

Server-side Includes not working.

by dburton In reply to Server-side Includes not ...

The question was auto-closed by TechRepublic

Collapse -

Server-side Includes not working.

by wls In reply to Server-side Includes not ...

Stupid question.

You did STOP and START the web server... yes?

Collapse -

Server-side Includes not working.

by dburton In reply to Server-side Includes not ...

The question was auto-closed by TechRepublic

Collapse -

Server-side Includes not working.

by dburton In reply to Server-side Includes not ...

This question was auto closed due to inactivity

Back to Linux Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums