nginx 未在 .shtml 檔案中執行 ssi 指令

nginx 未在 .shtml 檔案中執行 ssi 指令

我不明白為什麼 SSI 拒絕運行。我上線了nginx 1.25.2, 在烏班圖22.04

server {

    listen      x.x.x.x:443 ssl;
    listen      [::]:443 SSL;
    # other lines 

    include /home/bhccwga/conf/web/bhccwga.org/nginx.hsts.conf*;

    ssi on;

     # rest of code
}

我已經用非常基本的程式碼(列印出時間)嘗試過,但這與我們舊的 nginx 伺服器上運行良好的程式碼相同:

<!--#exec cgi="/cgi-bin/ri/ri.cgi"--></div>

還有其他地方我可以檢查嗎?當在瀏覽器中查看時,程式碼只是在 HTML 原始碼中列印出來(所以它不是執行錯誤,只是沒有運行)

配置有效:

 nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

相關內容