Open frozenminds opened 10 years ago
@frozenminds You don't have to remove ngx_ssi
from your nginx build. You just need to avoid mixing ngx_ssi
's configurations with ngx_lua
's in the same main request.
What do you have in your conf.d/server/fastcgi_params.conf
file? And what versions of ngx_lua and nginx are using? Are you using my openresty bundle?
BTW, please avoid using the word "ssi" in your configurations where ngx_ssi is not used at all. That is very confusing.
Hi @agentzh ,
First of all thank you for the quick reply.
I am using ngx_openresty-1.5.8.1
, seems like the latest. Also tried with ngx_openresty-1.4.3.6
.
Added now also the fastcgi_params.conf
file to my Gist: https://gist.github.com/frozenminds/5a1f0b9047c7af69ec61#file-fastcgi_params-conf
I do have in my main request some small Lua's: set_by_lua_file
, rewrite_by_lua_file
and header_filter_by_lua_file
. None of them is making any other sub-request or big stuff. Just very basic IF/ELSE.
Thank you!
@frozenminds Thank you for the info! I have several suggestions for you:
--with-debug
for ./configure
and use the debug
level in your error_log
directive) and provide all the debug logs for the problematic request. See also http://nginx.org/en/docs/debugging_log.htmlThanks!
@agentzh I will try to create an example for you. Hopefully tomorrow.
Thank you very much!
Still haven't finished the setup :( Would you mind to get access via SSH to an already configured server?
Thanks!
@frozenminds No, I don't mind. Please send me details privately to my email address, agentzh at gmail dot com :)
Seems to be something else actually. Will try to fix the code that I suspect and get back to you.
I have the same problem!
Could you tell me the Solutions!
Thank you @agentzh
@KunkkaCoco The NGINX SSI module is complicated and error prone. Better use ngx_lua to do the content templating instead. For example, with Lemplate:
Hello,
After reading the issue #23 I have updated my configuration to the following: https://gist.github.com/frozenminds/5a1f0b9047c7af69ec61
Each SSI request will try to get the content from Redis, if key is not saved in cache yet, it will fallback to a PHP route which will generate the content, save it to Redis and return the output. The second time, Nginx will retrieve the content from Redis because it was cached.
On a page I have 4 SSI calls. The last one hangs on the very first request before the page is also stored in Nginx's FastCgi cache.
I am aware of this: http://wiki.nginx.org/HttpLuaModule#Mixing_with_SSI_Not_Supported But what I do not understand, do I have to completely turn off the SSI module and write my own module that will parse the SSI tags () and then use ngx.location.capture or _ngx.location.capturemulti the get the content?
If I do have to parse the SSI tags, do you have any idea where do I start from? Could you please guide me further?
Thank you in advance! Boby