【问题标题】:How to add support of "secure_link" to already installed OpenResty?如何为已安装的 OpenResty 添加对“secure_link”的支持?
【发布时间】:2019-06-27 16:45:25
【问题描述】:

我在 OpenResty 的日志中有错误:

unknown directive secure_link

我在 Arch Linux 上,我以标准方式安装了 OpenResty

yay -S openresty

如何添加对 secure_link 的支持?

【问题讨论】:

    标签: nginx lua openresty


    【解决方案1】:

    你没有。向 nginx 添加新模块的唯一方法是重新编译它。

    这是来自bash script 的sn-p,我几乎在任何地方都使用它来安装openresty:

    latest='openresty-1.13.6.2'
    
    apt-get -y install libpcre3-dev libssl-dev perl make build-essential curl libzip-dev
    
    wget 'https://openresty.org/download/'$latest'.tar.gz'
    
    tar -xzf $latest'.tar.gz'
    
    cd $latest
    
    ./configure \
      --with-http_v2_module \
      --with-http_ssl_module \
    && make -j $(nproc) && make install || exit
    
    cd ..
    find -maxdepth 1 -name "$latest*" | xargs rm -rf
    

    您应该可以从那里复制并粘贴到正常工作的 openresty 安装。

    【讨论】:

    • 我在 Arch Linux 上
    • @pivoche 那又怎样?将apt-get 替换为您使用的任何包管理器,如果它们不同,请在谷歌上搜索包的名称,仅此而已。 wget 工作方式相同,tar 工作方式相同,很确定 cd 也工作方式相同。我从来没有声称你可以将那个 sn-p 原样复制到你的终端中。
    • 再一次:我将 OpenResty 安装为 yay -S openresty。不是手动的。 yay 不支持所有这些configure, make
    • @pivoche 再一次:你不能。你必须重新编译 nginx。如果你想使用预编译的包,你只需要处理它,除非有一个单独的包,其中包含更多的功能。
    猜你喜欢
    • 2012-01-01
    • 2018-06-27
    • 2014-01-29
    • 2016-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-08
    • 1970-01-01
    相关资源
    最近更新 更多