How to enable Apache to support the shtml configuration for include File Parsing

Source: Internet
Author: User

1. Confirm to load the include. so module and remove the comments:
LoadModule include_module libexec/apache2/mod_include.so

2. Remove the annotations in the AddType section:
AddType text/html. shtml
AddOutputFilter between des. shtml

3. Find the Directory permission
Options Indexes FollowSymLinks
Add the pair des:
Options Indexes FollowSymLinks Includes

4. Restart Apache and test:

<! -# Include file1_1_head.html "->
Holle Word !, This is intermediate content
<! -# Include fileenders into foot.html "->

The following is a supplement from other netizens:

What is SSI?
SSI is the abbreviation of Server Side encryption DES. Technically speaking, SSI is a command or pointer that can be called through the annotation line in an HTML file. SSI has powerful functions. You only need to use a simple SSI command to dynamically display the content update, time, and date of the entire website, and complex functions such as shell and CGI scripts.

How can your Apache server support SSI?

Apache does not support SSI by default. We need to change httpd. conf for configuration. Take Apache 2.0.x on windows as an example. Open the httpd. conf file in the conf directory and search "AddType text/html. shtml". The search result is as follows:Copy codeThe Code is as follows: # AddType text/html. shtml
# AddOutputFilter between des. shtml

Remove # from the front of the two rows.

Search "Options Indexes FollowSymLinks"
Add "des" after the row to be searched"
Change this row to Options Indexes FollowSymLinks Includes

Save httpd. conf and restart apache.

Now we have completed the configuration of Apache SSI.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.