Nginx Configuration SSI

Source: Internet
Author: User

I. What is SSI
Ssi:server Side Include, is a server-based Web authoring technology, most (especially Unix-based platform) Web servers such as Netscape Enterprise Server support SSI commands.
It works by using an SSI directive to include text, pictures, or code information in a Web page before the page content is sent to the client. For repeating content in multiple files, using SSI is an easy way to save content in an include file without having to enter it into all files. The include file is called with a very simple statement that instructs the WEB server to insert the content into the appropriate Web page. Also, when you use the Include file, all changes to the content can be done in one place only.

Two. How to configure SSI on Nginx
The main options you need are the following three:
SSI: default value off, set to on when SSI is enabled
ssi_silent_errors: default value off, when processing an SSI file error when opening, do not output error "[An error occurred while processing the directive]".
ssi_types: The default is text/html, so if you need to support HTML, you do not need to set this sentence, if you need to support shtml need to set: Ssi_types text/shtml
Three parameters can be placed under the HTTP, server or location scope.

Three. Example

server {    listen  10.3.9.27:80;    server_name  www. Ball. com;     / {        SSI on;        Ssi_silent_errors on;        Ssi_types text/shtml;        Index index. shtml;         /usr/local/web/wwwroot;        Expires 30d;        Access_log      /data/logs/www.ball.com-access_log main;    }}

Nginx Configuration 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.