NOTE: The below example is for enabling SSI for the Apache webserver.
There are a few places within your apache httpd.conf configuration file that may need to be modified to enable SSI. I will work my way through my config file, and paste the different areas you may want to modify.
#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks Includes ExecCGI
AllowOverride None
</Directory>
|
You will find the above code near the top of your config file. The most important part is the "Includes" (for enabling SSI) and "ExecCGI" (embedding cgi/perl scripts in SSI calls). AllowOverride tells apache wether or not you want to allow htaccess files to overwrite variables set in this file (httpd.conf).
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory; /your/home/path/public_html>
#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options +Includes +ExecCGI
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
|
Another very important part, you will find this shortly after the first part of code. Here you are telling apache exactly which directory (your root directory) to allow SSI calls from. Note the '+' before Includes and ExecCGI, I have found that this is very important on some systems / builds of apache.
ScriptAlias /public_html/ "/your/home/path/public_html"
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/your/home/path/public_html">
AllowOverride All
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
|
The above code is similiar to the last, just to give you an idea of the format for creating ScriptAlias directories. This allows you to enable SSI in only a certain dir (within your document root preferably). Again we allow htaccess override any thing set forth in this file.
#
# To use CGI scripts:
#
AddHandler cgi-script .cgi
#
# To use server-parsed HTML files
#
AddType text/html .shtml .html
AddHandler server-parsed .shtml .html
|
You will find this code shortly after the above code for ScriptAlias's. This tells apache to parse all files ending in .shtml and .html. NOTE: Setting apache to parse .html files as well as .shtml may cause a server speed decrease, as apache needs to parse EVERY html file, and check for ssi calls.
The above may be similiar, but not exactly what your configuration file may look like. If you have any questions please post them on our support forums.
<< Back
|