How to turn on SSI's on Apache

Information and discussion on Server Side Includes and PHP and ASP variants.

Moderators: rcrisler1, saltybeagle

How to turn on SSI's on Apache

Postby saltybeagle » Tue Dec 21, 2004 1:42 pm

These are the steps to turn on SSI's on Red Hat Linux w/ Apache, other distros should be very similar:

To turn on SSI's, Apache's httpd.conf needs to be edited.
Edit the file /etc/httpd/httpd.conf with your favorite editor, vi, pico, etc.
Inside this file, find your root directory for the site... should be something like, <Directory "/var/www/html">
Then inside this statement there should be a line that has all the options that are enabled for your root directory:

Options Indexes FollowSymLinks MultiViews +Includes

And what I'd do, is just tack on the +Includes on the end just like I've shown.

This will enable mod_include on the root directory and all subdirectories (that's what the plus sign indicates).

In addition, you may need to add these two lines, usually within the <IfModule mod_mime.c>, but check if they're already included.
AddType text/html .shtml
AddHandler server-parsed .shtml

Then just a simple 'sudo apachectl graceful' to restart apache, and includes should be turned on.
Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Postby saltybeagle » Tue Mar 28, 2006 4:26 pm

Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Postby matview » Sat Aug 19, 2006 9:27 pm

There are many way to do so. The official Apache docuement is at:

http://httpd.apache.org/docs/2.0/howto/ssi.html
and
http://httpd.apache.org/docs/1.3/howto/ssi.html
matview
 
Posts: 2
Joined: Sat Aug 19, 2006 9:19 pm


Return to PHP, ASP, mod_include

Who is online

Users browsing this forum: No registered users and 1 guest

cron