Configure Apache support for shtml (SSI) _linux

Source: Internet
Author: User

Open http.conf file and search shtml

Remove the first two lines of the #, which is as follows

If you want to configure shtml for the entire server

Search again for options Indexes FollowSymLinks

Add the includes to the inside as shown below:]

OK Chongqing Apache

Then test, build two files, actually a call header.shtml and a index.shtml

The header.shtml code is as follows:

Included in two forms: if you want to know, please find the relevant documents

Then visit:

sHTML Configuration succeeded ... It's good, it's strong.

Next, if not the global configuration, but the site configuration. Can be as follows: The specific I have not tested, are derived from the network.

Jane, say it:

<!--#include file= "file name"--> <!--#include virtual= "file name"--> filename is a relative path to the directory where the document using the #include directive resides. The included file can be in the same level of directory or its subdirectories, but not in the previous level directory. File= "nav_head.htm", such as the nav_head.htm document that represents the current directory. The virtual file name is the full path to the dummy directory on the Web site. For example, the Nav_head.htm file that represents the Hoyi directory under the root directory of the server document; virtual= "/hoyi/nav_head.htm"

The above is the global configuration, if it is not written

Can be set in a single directory:

The configuration virtual directory can be set as follows:

Copy Code code as follows:
Namevirtualhost www.xing.com
<virtualhost www.xing.com:80>
DocumentRoot F:\xing
ServerName www.xing.com
</VirtualHost>
<directory "F:\xing" >
Options Indexes followsymlinks Includes
AddType text/html. shtml
Addoutputfilter INCLUDES. shtml
AllowOverride None
Order Allow,deny
Allow from all
</Directory>

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.