首页  >  问答  >  正文

nginx安装第三方模块问题

我看的网上教程说在已安装nginx情况下安装nginx模块直接这样:
# ./configure --prefix=/usr/local/nginx-1.4.1 --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_image_filter_module --add-module=../ngx_pagespeed-master # make # /usr/local/nginx-1.4.1/sbin/nginx -s stop # cp objs/nginx /usr/local/nginx/sbin/nginx # /usr/local/nginx-1.4.1/sbin/nginx

我运行了下提示  ./configure:no such file or directory

求指点,或者有其他安装模块的方法吗?
过去多啦不再A梦过去多啦不再A梦2712 天前449

全部回复(2)我来回复

  • PHP中文网

    PHP中文网2017-05-16 17:27:44

    提示不是说的很清楚了么 当前位置下没有 ./configure 啊,要进入 你之前安装的nginx 源码目录才行,不行的话需要重新下载源码重新编译安装,如果是这种情况要导入之前的配置的话可以这么写:

    ./configure $(</path/to/>nginx -V 2>&1 | grep 'configure arguments' | sed 's/configure arguments://g') <configuration>
    

    /path/to替换成你当前安装的 nginx 目录位置,<configuration>为你后面想要增加的配置。

    回复
    0
  • 怪我咯

    怪我咯2017-05-16 17:27:44

    configure 脚本在 nginx 源码包 auto 目录下 ./auto/configure 即可

    回复
    0
  • 取消回复