haproxy – Lua is missing the socket.http module

I use Lua with HAProxy. I put LUA_PATH and LUA_CPATH as following:

LUA_PATH = / usr / bin / lua; /usr/bin/lua5.3; /usr/share/lua/5.3/ltn12.lua; /usr/share/lua/5.3/mime.lua; / usr / share / lua /5.3/socket.lua;/usr/share/lua/5.3/ssl.lua;/usr/share/lua/5.3/posix/_argcheck.lua;/usr/share/lua/5.3/ pOSIX / compat.lua; /usr/share/lua/5.3/posix/deprecated.lua;/usr/share/lua/5.3/posix/init.lua;/usr/share/lua/5.3/posix/sys.lua;/usr/share/ lua / 5.3 / posix / util.lua; /usr/share/lua/5.3/posix/version.lua; /usr/share/lua/5.3/socket/ftp.lua; /usr/share/lua/5.3/socket/headers.lua;/usr/share/lua/5.3/socket/http.lua;/usr/share/lua/5.3/socket/smtp.lua;/usr/share/ lua / 5.3 / socket / tp.lua; /usr/share/lua/5.3/socket/url.lua;/usr/share/lua/5.3/term/colors.lua;/usr/share/lua/5.3/term/cursor.lua;/usr/share/ lua / 5.3 / term / init.lua; /usr/share/lua/5.3/ssl/https.lua; /usr/share/lua/5.3/luarocks/add.lua; /usr/share/lua/5.3/luarocks /admin_remove.lua;/usr/share/lua/5.3/luarocks/build.lua;/usr/share/lua/5.3/luarocks/cache.lua;/usr/share/ lua / 5.3 / luarocks / cfg.lua; /usr/share/lua/5.3/luarocks/command_line.lua;/usr/share/l ua / 5.3 / luarocks / config_cmd.lua; /usr/share/lua/5.3/luarocks/deps.lua; /usr/share/lua/5.3/luarocks/dir.lua; /usr/share/lua/5.3/luarocks /doc.lua;/usr/share/lua/5.3/luarocks/download.lua;/usr/share/lua/5.3/luarocks/fetch.lua;/usr/share/ lua / 5.3 / luarocks / fs.lua; /usr/share/lua/5.3/luarocks/help.lua;/usr/share/lua/5.3/luarocks/index.lua;/usr/share/lua/5.3/luarocks/install.lua;/usr/share/ lua / 5.3 / luarocks / lint.lua; /usr/share/lua/5.3/luarocks/list.lua; /usr/share/lua/5.3/luarocks/loader.lua; /usr/share/lua/5.3/luarocks /make.lua;/usr/share/lua/5.3/luarocks/make_manifest.lua;/usr/share/lua/5.3/luarocks/manif_core.lua;/usr/share/ lua / 5.3 / luarocks / manif.lua; /usr/share/lua/5.3/luarocks/new_version.lua;/usr/share/lua/5.3/luarocks/pack.lua;/usr/share/lua/5.3/luarocks/path_cmd.lua;/usr/share/ lua / 5.3 / luarocks / path.lua; /usr/share/lua/5.3/luarocks/persist.lua; /usr/share/lua/5.3/luarocks/purge.lua; /usr/share/lua/5.3/luarocks /refresh_cache.lua;/usr/share/lua/5.3/luarocks/remove.lua;/usr/share/lua/5.3/luarocks/repo s.lua; /usr/share/lua/5.3/luarocks/require.lua; /usr/share/lua/5.3/luarocks/search.lua; /usr/share/lua/5.3/luarocks/show.lua; / usr / share / lua / 5.3 / luarocks / site_config.lua; /usr/share/lua/5.3/luarocks/type_check.lua; /usr/share/lua/5.3/luarocks/unpack.lua; / usr / share / lua /5.3/luarocks/upload.lua;/usr/share/lua/5.3/luarocks/util.lua;/usr/share/lua/5.3/luarocks/validate.lua;/usr/share/ lua / 5.3 / luarocks / write_rockspec.lua; /usr/share/lua/5.3/luarocks/build/builtin.lua; /usr/share/lua/5.3/luarocks/build/cmake.lua; /usr/share/lua/5.3/luarocks/build/command.lua/usr/share/lua/5.3/luarocks/build/make.lua;/usr/share/lua/5.3/luarocks/fs/lua.lua; /usr/share/lua/5.3/luarocks/ fs / tools.lua; /usr/share/lua/5.3/luarocks/fs/unix.lua; /usr/share/lua/5.3/luarocks/fs/win32.lua; /usr/share/lua/5.3/luarocks /fetch/cvs.lua;/usr/share/lua/5.3/luarocks/fetch/git_file.lua;/usr/share/lua/5.3/luarocks/fetch/git_http.lua /usr/share/lua/5.3/ luarocks / fetch / git_https.lua; /usr/share/lua/5.3/luarocks/fetch/git.lua; /usr/share/lua/5.3/lua rocks / fetch / git_ssh.lua; /usr/share/lua/5.3/luarocks/fetch/hg_http.lua; /usr/share/lua/5.3/luarocks/fetch/hg_https.lua; /usr/share/lua/5.3 /luarocks/fetch/hg.lua;/usr/share/lua/5.3/luarocks/fetch/hg_ssh.lua;/usr/share/lua/5.3/luarocks/fetch/sscm.lua / usr / share / lua / 5.3 / luarocks / fetch / svn.lua; /usr/share/lua/5.3/luarocks/tools/patch.lua; /usr/share/lua/5.3/luarocks/tools/tar.lua; / usr / share / lua /5.3/luarocks/tools/zip.lua;/usr/share/lua/5.3/luarocks/upload/api.lua; /usr/share/lua/5.3/luarocks/upload/multipart.lua
LUA_CPATH = / usr / lib64 / lua / 5.3 / posix / ctype.so; /usr/lib64/lua/5.3/posix/dirent.so; /usr/lib64/lua/5.3/posix/errno.so; / usr / lib64 / lua / 5.3 / posix / fcntl.so; /usr/lib64/lua/5.3/posix/fnmatch.so; /usr/lib64/lua/5.3/posix/glob.so; /usr/lib64/lua/5.3 /posix/grp.so;/usr/lib64/lua/5.3/posix/libgen.so;/usr/lib64/lua/5.3/posix/poll.so;/usr/lib64/ lua / 5.3 / posix / pwd. na; /usr/lib64/lua/5.3/posix/sched.so; /usr/lib64/lua/5.3/posix/signal.so; /usr/lib64/lua/5.3/posix/stdio.so; / usr / lib64 / lua / 5.3 / posix / stdlib.so; /usr/lib64/lua/5.3/posix/syslog.so; /usr/lib64/lua/5.3/posix/termio.so; /usr/lib64/lua/5.3 /posix/time.so;/usr/lib64/lua/5.3/posix/unistd.so;/usr/lib64/lua/5.3/posix/utime.so;/usr/lib64/ lua / 5.3 / mime / core. na; /usr/lib64/lua/5.3/socket/core.so; /usr/lib64/lua/5.3/socket/serial.so; /usr/lib64/lua/5.3/socket/unix.so; / usr / lib64 / lua / 5.3 / term / core.so; /usr/lib64/lua/5.3/ssl.so; /usr/lib64/lua/5.3/zlib.so

my haproxy.cfg the file tries to load auth-request.lua in the global section of the file. When I try to start HAProxy, the service fails. journalctl -xe gives the following error: socket.http module not found.

I've also installed luasocket using luarocks.