What is SSI (Server Side includes)?
If you've ever used Apache, you should know that it enables static Web pages to include features like dynamic Web pages, as well as some simple syntax
Nginx comes with SSI by default.
In the Nginx open SSI, add the following 3 lines is OK, can be placed in the HTTP, server, and Location section are line
HTTP {
SSI on;
Ssi_silent_errors on;
Ssi_types text/shtml;
Include Mime.types;
Default_type Application/octet-stream;
Or
server {
SSI on;
Ssi_silent_errors on;
Ssi_types text/shtml;
Listen 80;
server_name localhost;
Or
Location =/50x.html {
SSI on;
Ssi_silent_errors on;
Ssi_types text/shtml;
root HTML;
Three domains are configured. SSI on;
Ssi_silent_errors on;
Ssi_types text/shtml;
Examples of Use methods: <p>21andy.com Nginx + ssi</p>
<!--# include file= "/tmp/test.html"-
Note the problem with the path, not the absolute path of the hard disk, but the absolute path of the site
But I saw in the official document that SSI had a problem, that last-modified and Content-length would not send
That's when SSI was enabled the last-modified and content-lengthheaders are not sent
Actually tested it, indeed, alas, the ointment.
Nginx built-in module with cache memory Nginxhttpmemcachedmodule
, which can support a simple cache. Nginx+ssi+memcached is currently a popular architecture in pursuit of high-performance trends, leveraging server-side scripting to process access requests and retrieve data from memcache or directly from the backend. Where SSI is Serversideincludes, the Chinese translation is server-side included, which provides a way to add dynamic content to existing HTML documents. It is gratifying to note that Nginx also has a built-in SSI module NGX_HTTP_SSI_MODULE.