Michael Doran Home Page
Contact | Site Map | Search  
  Home > Archives > Server Side Includes > Server Setup

Server Side Includes

(Apache) Server Setup

Introduction | Examples | Templates | Server Setup

If you try using Server Side Includes (SSI) but they don't work, it may be because your web server is not configured to allow it. It's also possible that some SSI commands (include, echo) will work while others (exec) won't. If you run your own server, it will be up to you to do the configuration; otherwise you must talk to the server administrator.

These Apache web server configuration directives should fully enable SSI:
AddHandler cgi-script .cgi
AddHandler server-parsed .html .htm
<Directory /your/document/root/directory>
    AllowOverride All
    Options Includes ExecCGI
    Order allow,deny
    Allow from all
</Directory>
For more information see the Apache documentation especially Configuring your server to permit SSI and the Apache SSI FAQ's. Another resource is Builder.Com's Learn how to configure Apache.