Configure Server Side Includes - Wamp
Posted by: Thia (---.client.mchsi.com)
Date: February 24, 2013 02:07PM

Could some tell me what I need to do to enable or configure server side includes on my local wamp server. So far I have a pretty basic install of Wamp on a windows vista pc. I'm using this server to test webpages prior to posting them to the web. Any help would be great.

Thanks-

Options: ReplyQuote
Re: Configure Server Side Includes - Wamp
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 24, 2013 02:35PM

Server Side Includes or SSI is controlled by Apache

Read this to tell you what needs to be changed in your httpd.conf

[httpd.apache.org]

Options: ReplyQuote
Re: Configure Server Side Includes - Wamp
Posted by: Thia (---.client.mchsi.com)
Date: February 24, 2013 06:50PM

Thanks for the reply. I'm new to apache. Have you done this before and if so how complex is this?

Options: ReplyQuote
Re: Configure Server Side Includes - Wamp
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 24, 2013 11:39PM

Easy, just follow the documentation.

Make a copy of the httpd.conf file before you start just in case you mess up, then you can restore it and start again

Options: ReplyQuote
Re: Configure Server Side Includes - Wamp
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 25, 2013 12:51PM

Actually if you search your httpd.conf for .shtml all that is required is already in the file but commented out.

uncomment
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

and in this section

<Directory "d:/wamp/www/">

...

...

Options Indexes FollowSymLinks

change to

Options Indexes FollowSymLinks Includes


Of course make sure your ssi code lives in a file with the .shtml extension

Options: ReplyQuote
Re: Configure Server Side Includes - Wamp
Posted by: seanloo (123.136.106.---)
Date: July 05, 2014 11:18AM

How to enable Server Side Include (SSI) in WAMP if don't want to add .htaccess file?

First, open any text editor software (example Notepad, or Notepad++)

Open "http.conf" file from <your drive>:\wamp\bin\apache\Apache(version)\conf\httpd.conf

Find these two lines and remove both hashtag "#":
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

Add this line to allow index.shtml to be the default page. If not found, index.html will be loaded.
DirectoryIndex index.shtml index.html

So the result is:
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
DirectoryIndex index.shtml index.html

Then find this line:
#Options Indexes FollowSymLinks

And change to:
Options +Includes

Save the file and restart WAMP. Done!

Options: ReplyQuote


Sorry, only registered users may post in this forum.