Help getting lua ssl certificate management up and running (ssl_certificate_by_lua*)

294 views
Skip to first unread message

David Goldman

unread,
Jan 11, 2016, 1:25:59 PM1/11/16
to openresty-en
Hi everyone,
I'm very new to OpenResty, but I'm super-excited from the little I've seen so far! 
I'm having some trouble getting the ssl_certificate_by_lua_block / ssl_certificate_by_lua_file directives working. I keep getting an "unknown directive" error about the statements in the nginx config file.

What I've tried so far:
1. I've tried following the directions at http://blog.dutchcoders.io/compiling-nginx-with-luassl-openresty/ to build 
2. I've tried working from the latest version at the master branch of the ngx_openresty repo (at https://github.com/openresty/ngx_openresty).
3. I've tried building the latest stable release (1.9.7.1) with various patches (hacking my way to a hybrid version, without much luck).

I've built all editions with the following flags:
"--with-http_ssl_module --with-luajit --with-openssl=../openssl-1.0.2e/ --with-ipv6"
(I'm using OpenSSL 1.0.2e and not 1.0.2a, but I doubt that's what's causing the issue).

According to this page: https://github.com/openresty/lua-nginx-module/issues/331, all the required changes have been commited to master, so the second option should have been the easiest to follow and the most reliable, but none of the above worked for me (nginx will not accept any ssl_certificate_by_lua statements in the config files.

Is there anyone who can offer any insight into what I'm missing? I'd appreciate any help you can offer :-)


Best regards,
Dave

Yichun Zhang (agentzh)

unread,
Jan 11, 2016, 1:31:47 PM1/11/16
to openresty-en
Hello!

On Mon, Jan 11, 2016 at 10:25 AM, David Goldman wrote:
> I'm very new to OpenResty, but I'm super-excited from the little I've seen
> so far!
> I'm having some trouble getting the ssl_certificate_by_lua_block /
> ssl_certificate_by_lua_file directives working. I keep getting an "unknown
> directive" error about the statements in the nginx config file.
>

This means that the correct version of ngx_lua has not yet been
compiled into your nginx.

I'll kick out the OpenResty 1.9.7.2 RC1 release candidate soon today.
It'll be much easier for you and others to try out the new
ssl_certificiate_by_lua* directives :)

Best regards,
-agentzh

David Goldman

unread,
Jan 11, 2016, 1:40:45 PM1/11/16
to openresty-en
That would be absolutely great! 
Thanks for the extremely quick reply, and thanks for all your hard work, Agentzh! 
This is one of the most well maintained projects I've ever encountered :-)

-Dave
Reply all
Reply to author
Forward
0 new messages