Make apache support shtml configuration method

Source: Internet
Author: User

Local configuration of apache to support the shtml page is relatively simple, but it took me a lot of time, because the path is faulty, and so far I have not got a good solution. In fact, the main reason is that my website is incompatible with the apache platform on the iis platform. It is estimated that it will be hard to switch to the linux system in the future.

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:

# 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.

 

After this configuration, the. shtml file can be run, but the error "[an error occurred while processing this directive]" is reported. <! -- # The include file command cannot be executed. I did not find the reason for the configuration on the left, but later I found it was <! -- # Include file = the parent path is not supported. It is really depressing. You have to change the command. <! -- # Include virtual. But with this command, you cannot run it on the iis platform. Not found online either. <! -- # Include file supports parent path Configuration

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.