在Nginx配置中运行Lua吗? [英] Running Lua in Nginx config?

查看:342
本文介绍了在Nginx配置中运行Lua吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以涉及Google搜索的并不是我那么聪明或不幸,但实际上我找不到在Nginx配置中运行Lua的任何方法,而不必使用LuaJIT重新编译整个服务器. 问题是,我们希望对某些变量进行微小的编辑,而不必在每次构建时都重新编译我们的服务器,这可能每周多达几次,更简单=更少需要我们修复的东西.

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.

所以我的问题是,有没有一种方法可以在Nginx配置中运行Lua而不必重新编译整个程序,因为我们希望由系统保持Nginx的更新,而不是我们必须维护的另一件事?

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?

我在搜索Lua时发现了Nginx-extras,但是我找不到要备份的数据以确保可以使用Lua吗?

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?

推荐答案

我为此找到了解决方案,至少对于使用Ubuntu的人来说,有一个受支持的nginx工作版本支持Lua和许多其他功能,您只是必须要做的:

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

代替常规:

apt-get install nginx

Extras不是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.

这篇关于在Nginx配置中运行Lua吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆