Hello!
On Wed, Jun 4, 2014 at 1:16 AM, kirimedia wrote:
> location = /include/ {
> content_by_lua '
> ngx.location.capture("/empty/")
> ngx.location.capture("/empty/")
> ';
> }
>
> location = /ssi.html {
> ssi on;
> }
> }
> }
>
> Content of /usr/local/nginx/html/ssi.html
> HEADER
> <!--#include virtual="/include/" wait="yes" -->
>
Do not mix ngx_lua's subrequests with SSI's subrequests in a single
main request! It just won't work because ngx_lua uses an adjusted
(enhanced) subrequest model that is incompatible with nginx's standard
subrequests. So do not mix them in a single main request otherwise SSI
will get confused and do bad things.
This is actually documented:
https://github.com/openresty/lua-nginx-module#mixing-with-ssi-not-supported
It is recommended to replace your SSI templates with proper Lua-land
templates, which is more flexible and often more efficient than SSI
(keep in mind that ngx_ssi works on the output filter level).
BTW, please do not send the same post multiple times to the list; it
is annoying.
Regards,
-agentzh