Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Installing SSI mod_include 1

Status
Not open for further replies.

thorby

Programmer
Feb 18, 2011
2
0
0
GB
Hi All,

Apologies should read SSI mod_include

I understand I need to install the include module for Apache 2.2 in order to process my included pages like:

<!--#include virtual="something.html" -->

However, I do not know if there are additional apache files that need to be downloaded, where they should be stored or how to configure the apache httpd.conf.

Additionally, is there anything else I would need to make sure this feature works correctly?

Please note I am running everything locally.

Many thanks
Martin
 
After hours of searching I found the informative ricocheting.com

see
Here it is clearly explained how to configure Apache on windows to parse html and shtml with the include module.

First: ensure mod_include.so is included in the apache/.../modules folder.

Then edit the following lines in the httpd.conf (remember to backup the original httpd.conf, just in case)

remove # on line
#LoadModule include_module modules/mod_include.so
to read
LoadModule include_module modules/mod_include.so

This will add the mod_include.so to the apache configuration


Then edit the line
Options Indexes FollowSymLinks
to read
Options Indexes FollowSymLinks Includes

to enable Includes

Then remove # from lines
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
to read
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Save httpd.conf and restart apache

It may be overkill, just bad design on my part or just not needed , but I want Apache to parse html, shtml and htm documents referenced by the #include statement, so I have added the following lines in my httpd.conf

AddType text/html .html
AddOutputFilter INCLUDES .html
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType text/html .htm
AddOutputFilter INCLUDES .htm

Many thanks ricocheting.com
 
Welcome to Tek Tips!

By the way. thank you for posting the solution that you found. It might help someone else in the future.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top