在Ubuntu服务器上安装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,但我在运行Openresty时遇到了使用“systemd”的问题

我只有一个干净的Digitalocean droplet并且想要在上面安装Openresty并与lua一起工作。是否有任何标准和可工作的文章可以用于安装Openresty并配置它?

点赞
用户4984564
用户4984564

我之前为个人使用构建了 resty-install.sh。也许你可以直接使用它,或稍微修改一下。

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

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

2019-07-10 11:23:52
用户7878182
用户7878182

已解决。我再次按照这篇文章操作:https://www.digitalocean.com/community/tutorials/how-to-use-the-openresty-web-framework-for-nginx-on-ubuntu-16-04

问题在于,在进行第三步操作之前,我们应该确保关闭已经在 80 端口运行的 Openresty。

2019-07-10 13:27:22