在Ubuntu服务器上安装Openresty

时间:2019-07-10 11:08:01

标签: nginx lua openresty

我尝试了此文档http://openresty.org/en/getting-started.html,但遇到了“ content_by_lua_block”问题

然后我尝试了本文档https://www.digitalocean.com/community/tutorials/how-to-use-the-openresty-web-framework-for-nginx-on-ubuntu-16-04,并在使用“ systemd”运行Openresty时遇到了问题

我只有一个干净的Digitalocean小滴,想要在其上安装Openresty并使用lua。是否有任何标准和适用的文章来安装Openresty并对其进行配置?

2 个答案:

答案 0 :(得分:0)

我不久前建立了resty-install.sh供个人使用。也许您可以使用它(按原样,或稍作修改后)。

请注意:它确实为openresty安装了一个自定义启动脚本,使它在当前目录中查找openresty.conf,而不是在安装目录中查找nginx.conf。 (脚本的第50行)

此外,它还将示例配置写入/usr/local/openresty/example.conf,您可能不需要。 (第55行之后的所有内容)

答案 1 :(得分:0)

已修复。我再次关注了这篇文章https://www.digitalocean.com/community/tutorials/how-to-use-the-openresty-web-framework-for-nginx-on-ubuntu-16-04

问题是我们应该在步骤3之前就杀死已经在端口80上运行的Openresty