Always read the documentation for your server first. This page is intended as a general guide and is not server specific.

SUPPORTS SSI DOES NOT SUPPORT SSI
NCSA HTTPd CERN HTTPd
APACHE Netscape Enterprise/Suite Spot
Microsoft IIS Microsoft Personal Web Server

SSI must be supported by the server in order to be able to be configured on the server. You must also configure and/or rename your files so that the server knows they contain SSI directives.

APACHE WEB SERVER

http://www.apache.org)
  1. Open httpd.conf (usually in /etc)
  2. Locate the <DIRECTORY> in httpd.conf where you want to enable SSI.
  3. Add the following line inside the <DIRECTORY> section:

    AddType text/x-server-parsed-html .shtml

  4. This next bit gets tricky. You have to tell the server where to expect the SSI's and what SSI's are allowed to do.

    a. To enable SSI's to be included in the page use: 

    Options +Includes

    b. To enable SSI's to execute external programs on the server use:

    Options ExecCGI

    c. To enable BOTH includes and CGI's, use:

    Options Includes ExecCGI

  5. Save httpd.conf file.
  6. Restart the Apache server.
  7. Add your SSI directives to one or more files.
  8. Change the extension of those files from .htm or .html to .shtml.

You should not use .html as the file extension identifier for SSI directives. Server Side Includes take up processing power, so enabling SSI in all web pages is not usually a good idea unless you have computing power to burn.

For the Apache server, there is also the X-Bit hack. See the Apache's Server Side Include page for more information. Since Apache IS the NCSA HTTPd server with 'patches' applied, the configuration methodology is nearly identical to what you do to configure the NCSA HTTPd.

MICROSOFT INTERNET INFORMATION SERVER (IIS)

WARNING: Make certain you are using the latest Windows Service Pack, and the latest patch level for IIS. Note that Microsoft does NOT support a full NCSA compliant HTTPd implmentation, thus, it does NOT support SSI directves fully.

Server Side Includes are already enabled on Microsoft's servers by default, making them less secure than the Apache server in this regard. All you have to do is add the directives to your page and rename them *.shtml.



Bookmark this page and SHARE:  

Search

Donations

Free Training