zoukankan      html  css  js  c++  java
  • nginx: the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf

    Nginx如果未开启SSL模块,配置Https时将提示如题错误

    原因:nginx缺少http_ssl_module模块,编译安装的时候带上--with-http_ssl_module配置就行了,但是现在的情况是我的nginx已经安装过了,怎么添加模块(我的nginx的安装目录是/usr/local/nginx这个目录,我的源码包在/home/nginx-1.16.1目录)

    1、切换到源码包:cd /home/nginx-1.16.1

    执行:./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

    2、配置完成后,运行命令:make           注意:这里不要进行make install,否则就是覆盖安装

    3、备份原有已安装好的nginx:cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

    4、将刚刚编译好的nginx覆盖掉原有的nginx(这个时候nginx要停止状态):cp ./objs/nginx /usr/local/nginx/sbin/

    5、启动nginx,通过命令查看是否已经加入成功:/usr/local/nginx/sbin/nginx -V

  • 相关阅读:
    MYSQL分库分表
    MYSQL主从数据库
    mysql not in用法
    python 文件及目录操作
    python 读写文件
    python字符编码
    python类的继承、封装和多态
    python之定义类创建实例
    理解OSI参考模型
    python闭包与装饰器
  • 原文地址:https://www.cnblogs.com/101key/p/12119353.html
Copyright © 2011-2022 走看看