A
A
Alexander2018-04-23 18:17:17
Nginx
Alexander, 2018-04-23 18:17:17

How to build nginx with http_ssi_module?

Hello! I use nginx 1.10.3 on Debian 9. At one point I needed SSI, but either they don't work out of the box, or I'm doing something wrong. For example, there are such files:
name: 1.htm
content: test
----------------------
name 2.htm
content: (! --#include file="1.htm" --)
(actually, instead of parentheses, there are angle brackets)
I request nginx 2.htm, the answer comes (!--#include file="1.htm" --), instead of the expected test. nginx config:
location = / {
ssi on;
}
Assumed that the ssi module is not installed. Debian site says:
Package: nginx-light[|| full || extras] (1.10.3-1+deb9u1)
OPTIONAL HTTP MODULES: ... SSI ...
Does this mean that the module is included in the nginx distribution and needs to be activated somehow, or just not included, I don't know. If not enabled, you need to rebuild nginx. I'm trying to compile according to this article , I add --with-http_ssi_module to the ./configure command at the end and I get the error
./configure: error: invalid option "--with-http_ssi_module".
I try to register the module a little differently, but it does not help:
./configure: error: invalid option "--with-http_ssi_filter_module"
./configure: error: invalid option "--with-http_ssi_module=dynamic"
Question: where am I, what am i doing it wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2018-04-23
@Lynn

SSI is available in nginx.
Is your problem in config?

location = / {
  ssi on;
}

This location has no effect on the 1.htm file Must
be without equals
location / {
  ssi on;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question