Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Feb 142010
 

Enable Server Side Includes in Apache

Answer:

Server Side Includes (SSI) is a simple mechanism that allow you to add dynamic elements into your HTML file without playing with complicated scripting languages such as PHP or Perl.

To enable it under Apache, add the following lines to the Apache configuration (httpd.conf)

<IfModule mod_include.c>

    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml

</IfModule>

Restart Apache to take effect

# apachectl -k graceful

Now all yout .shtml files be will parsed and SSI related tags will be evaluated.

To see what SSI directives you can use, check out the following document:

http://httpd.apache.org/docs/2.2/mod/mod_include.html

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>