Nginx下html中启用include引入html功能
-
Nginx中启用ssi,location配置中加入三行配置,重启。
location / { ssi on; ssi_silent_errors on; ssi_types text/shtml;
-
index.html引入header.html
<!-- 切记include的#前不能有空格 --> <!--#include file="/html/public/header.html"-->
Nginx中启用ssi,location配置中加入三行配置,重启。
location / {
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
index.html引入header.html
<!-- 切记include的#前不能有空格 -->
<!--#include file="/html/public/header.html"-->