nginx開啟ssi功能是最簡單的,建議使用此方式
找到nginx-conf或是你當前站點的conf文件,找到以下代碼
~~~
location / {
index index.html index.htm index.php;
}
~~~
修改成以下代碼,重啟便可以了
~~~
location / {
ssi on;
ssi_silent_errors on;
ssi_types text/html;
index index.html index.htm index.php;
}
~~~