openresty下提示nginx:…unknown directive "content_by_lua_block"

Shining document (http://openresty.org/cn/getting-started.html) prompt written helloworld a openresty, and when you run nginx -p `pwd` / -c conf / nginx.conf: ... unknown directive" content_by_lua_block ", said to be some blog version openresty installed too low, but I wondered if I have the latest version, should not be the reason, then see this discussion: https: //segmentfault.com/q/1010000019781462/ , feeling a little direction, and again on github see: https://github.com/openresty/lua-nginx-module/issues/1554 a period like this:

Seems like you're not invoking openresty's nignx. 
You may have multiple nginx executables in your system.
Try invoking openresty's nginx binary explicitly via its full path instead of relying on changing PATH environment variable values.

Nginx guess the reason is not openresty their own use in the built-in nginx.

Later, suddenly remembered that he ./configure in the implementation of seemingly ignores some parameters. . .

Official reference parameters given as follows :( forget that he was a little added which (or no additional parameters))

./configure --prefix=/opt/openresty \
            --with-luajit \
            --without-http_redis2_module \
            --with-http_iconv_module \
            --with-http_postgres_module

So once again compile openresty, the top four will add to the whole parameters, and then follow the previous steps to perform successfully!

A little record, if you encounter the same problem, I hope you can help!

Guess you like

Origin www.cnblogs.com/Guhongying/p/11621605.html