nginx编译安装某个模块

nginx https 配置(nginx.conf):

server {
    listen 443;
    server_name localhost;
    ssl on;
    root html;
    index index.html index.htm;
    ssl_certificate   cert/1523606516008.pem;
    ssl_certificate_key  cert/1523606516008.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location / {
        root html;
        index index.html index.htm;
    }
}

nginx配置https 的时候重启nginx报错 :nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:205


原因:没有安装ssl模块  

找到nginx以前的安装文件编译安装

nginx编译安装某个模块_第1张图片

然后 make即可 (不要make install,会覆盖上次的安装)

最后  覆盖以前的nginx文件(覆盖之前先备份下)

# cp /www/package/nginx-1.5.9/objs/nginx /usr/local/nginx/sbin/nginx

重启nginx即可





你可能感兴趣的:(nginx,nginx编译安装模块,nginx模块)