auto-ssl / lua-resty-auto-ssl

On the fly (and free) SSL registration and renewal inside OpenResty/nginx with Let's Encrypt.
MIT License
1.93k stars 182 forks source link

lua_package_path configuration fails #105

Open b4upradeep opened 6 years ago

b4upradeep commented 6 years ago

Getting the following error when trying to start / restart nginx

init_by_lua error: init_by_lua:2: module 'resty.auto-ssl' not found:
    no field package.preload['resty.auto-ssl']
    no file './resty/auto-ssl.lua'
    no file '/usr/share/lua/5.1/resty/auto-ssl.lua'
    no file '/usr/share/lua/5.1/resty/auto-ssl/init.lua'
    no file '/usr/lib/lua/5.1/resty/auto-ssl.lua'
    no file '/usr/lib/lua/5.1/resty/auto-ssl/init.lua'
    no file './resty/auto-ssl.so'
    no file '/usr/local/lib/lua/5.1/resty/auto-ssl.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file './resty.so'
    no file '/usr/local/lib/lua/5.1/resty.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'

This is what was configured for lua_package_path in nginx conf file

lua_package_path './?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib/lua/5.1/?.lua;/usr/lib/lua/5.1/?/init.lua';
    lua_package_cpath './?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so';

Please advice.

kapouer commented 6 years ago

This all depends on where you actually installed resty-auto-ssl... For example i installed it locally (userland nginx) so i only had to do lua_package_path './rocks/share/lua/5.1/?.lua;';