【问题标题】:Installing Openresty on Ubuntu server在 Ubuntu 服务器上安装 Openresty
【发布时间】:2019-11-20 00:06:44
【问题描述】:

我尝试了这个文档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 droplet,想在上面安装 Openresty 并使用 lua。有没有安装和配置 Openresty 的标准和工作文章?

【问题讨论】:

    标签: nginx lua openresty


    【解决方案1】:

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

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

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

    【讨论】:

    • 我该如何使用它?我只是把它复制到/home/install.sh 并没有工作
    • 这是错误“在 PATH 中找不到 gmake 或 make”。
    • 这很奇怪...脚本安装build-essentials,在ubuntu上应该包括make...
    • 您不是以 root 身份运行脚本吗?如果没有,那么它将无法工作,因为它将无法使用apt 安装所需的软件包。无论哪种方式,我都建议不要直接运行脚本,而是逐行浏览并挑选出您需要的内容。
    • 我现在正面临这个“未知指令“content_by_lua_block”
    【解决方案2】:

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

    问题是我们应该在第 3 步之前终止已经在端口 80 上运行的 Openresty

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-09
      • 2014-10-27
      • 2015-12-03
      • 2012-07-26
      • 2017-11-28
      • 2012-12-21
      • 2020-07-19
      相关资源
      最近更新 更多