Running Lua in Nginx config?

2019-04-05 07:33发布

So it might just be me that is not super bright or super unlucky when it comes to Google searches, but I can't actually find any way to run Lua in the Nginx config without having to recompile the entire server with LuaJIT. The thing is that we would like to do tiny edits of some variables without having to recompile our server on every build, which could be as much as several times a week, less complex = less stuff for us to fix.

So my question is, is there a way to run Lua in Nginx configs without having to recompile the entire thing, as we would like to keep Nginx updated by the system and not be another thing we have to maintain?

I found Nginx-extras while searching for Lua, but I can't find any data to back up that this should enable the ability to use Lua or not?

标签: nginx lua
1条回答
SAY GOODBYE
2楼-- · 2019-04-05 07:47

I found a solution myself to this, at least for people using Ubuntu, there is a supported working version of nginx that supports Lua and many other things, you just have to do:

apt-get install nginx-extras

Instead of the regular:

apt-get install nginx

Extras is NOT an add-on package for nginx, it is a fully compiled server, you can go here to see other version you might prefer:

http://www.cambus.net/nginx-packages-in-debian-stable/

https://wiki.debian.org/Nginx

Hope this helps you as much as it did me.

查看更多
登录 后发表回答