Jump to content

Can't get SSI to work with Apache


Fluffy654

Recommended Posts

First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making a really obvious mistake.

 

To test this, I have successfully installed apache and have read the official documentation on how to get SSI functionality working. Unfortunately, I can't get it to work at all. After reading tons of threads on this matter on various forums, I am still short of an answer.

 

Being a complete noob, I am not used to editing the httpd.conf and so I think I have probably just screwed this up somehow.

 

My test directory looks like this:

index.shtml

menu.html

 

index.shtml contains <!--#include virtual="/menu.html" -->

menu.html only contains html content without body, head or html tags

 

The relevant parts of my httpd.conf look like this:

Options Indexes FollowSymLinks Includes

...

AddType text/html .shtml

AddOutputFilter INCLUDES .shtml

 

However, when I go to http://localhost/ it brings up a directory list instead of automatically opening index.shtml (as it would if it were index.html) and when I click on index.shtml, the page is rendered in code rather than content.

 

I have also tried changing all the ".shtml"s to ".html"s and this renders the content of index.html correctly but ignores the SSI.

 

Thanks very much for any help that anyone can provide!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.