Clarify redis socket path format in the docs (was: Redis server with socket connection not working)
I set up redis with { socket = "/var/run/redis/redis.sock" } and this is the result:
ssl_certificate.lua:134: get_cert_der(): auto-ssl: error fetching certificate from storage for www.example.net: failed to parse host name "/var/run/redis/redis.sock": invalid host
ssl_certificate.lua:77: issue_cert(): auto-ssl: failed to obtain lock: failed to parse host name "/var/run/redis/redis.sock"
ssl_certificate.lua:286: auto-ssl: could not get certificate for www.example.net - using fallback - failed to get or issue certificate
@tpimh: Try prefixing the socket path with unix:, so: { socket = "unix:/var/run/redis/redis.sock" }.
Assuming that does the trick, then I've hopefully clarified our docs about this (since this wasn't really obvious unless you dig around the underlying lua-resty-redis library) in https://github.com/GUI/lua-resty-auto-ssl/commit/0fe6ab67f091d75821a865d8d71122dc04e8ff0d. Thanks for spotting this!
Thank you! I already did connect with unix socket with lua-resty-redis, but absolutely forgot about it, so I blamed the library. Now redis connection is successfull, but I get another error:
ssl_certificate.lua:305: ssl_certificate(): auto-ssl: failed to run do_ssl: ...ocal/openresty/lualib/resty/auto-ssl/ssl_certificate.lua:95: attempt to index upvalue 'ssl_provider' (a userdata value)
Since I also get it using file storage, this is out of scope of this issue (I will try to investigate further and if I'm unable to solve it, I'll open another issue). This one is resolved and may be closed after adding a clarification to the docs.