nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:102

到解压的nginx目录下

./configure --with-http_ssl_module

当执行上面语句,出现./configure: error: SSL modules require the OpenSSL library.

用 yum -y install openssl openssl-devel

再执行./configure

重新执行./configure --with-http_ssl_module

make ,切记不能make install 会覆盖。

把原来nginx备份

cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

把新的nginx覆盖旧的

cp objs/nginx /usr/local/nginx/sbin/nginx

出现错误时cp: cannot create regular file ‘/usr/local/nginx/sbin/nginx’: Text file busy

用cp -rfp objs/nginx /usr/local/nginx/sbin/nginx解决

测试nginx是否正确

/usr/local/nginx/sbin/nginx -t

(nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful)

重启nginx

/usr/local/nginx/sbin/nginx -s reload

nginx:[emerg]unknown directive "ssl"的更多相关文章

  1. Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"

    Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"     出现如图所示错误,处理办法如下 去nginx解压目录下执行 ./co ...

  2. 错误提示 nginx: [emerg] unknown directive "gzip_static"

    1.检查nginx配置文件错误提示如下: [root@server nginx]# /applications/nginx/sbin/nginx -t -c /applications/nginx/n ...

  3. nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx.conf:36

    nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx ...

  4. nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理

    当我们在修改Nginx的配置文件,然后加载配置文件./nginx -s reload   报错类似的错误, nginx: [emerg] unknown directive “ ” in /usr/l ...

  5. nginx: [emerg] unknown directive "stub_status" in /home/oscf/nginx/conf/conf.d/ngx_metric.conf

    解压安装过程命令如下: cd /home/oscf #该目录下有nginx压缩包 mkdir nginx tar -zxvf nginx-1.16.0.tar.gz cd nginx-1.16.0 . ...

  6. nginx报错:nginx: [emerg] unknown directive in /etc/nginx/conf.d/test.conf:4

    nginx报错:nginx: [emerg] unknown directive  in /etc/nginx/conf.d/test.conf:4 解决: 第四行出现了 tab 空格 , 换成正常的 ...

  7. nginx: [emerg] unknown directive “ ” in /usr/local/nginx/conf/vhost/XXX.conf:53报错处理

    开发同事发给我一小段nginx配置,加到服务器上之后,执行nginx -s reload时,出现报错: nginx: [emerg] unknown directive “ ” in /usr/loc ...

  8. nginx: [emerg] unknown directive "stub_status" in /usr/local/openresty/nginx/conf/conf.d/ngx_metric.conf:19

    问题分析 Nginx没有添加modules/ngx_http_stub_status_module.o模块. 问题解决 没有安装的话,可以在tar包安装编译的时候添加如下参数: # ./configu ...

  9. 启动Nginx 出现 nginx: [emerg] unknown directive "锘?user" 错误

    出现这种情况 一般是修改配置文件 nginx.conf 造成的 如果你修改文件后出现 那基本上就是这个原因 启动不了 重新打开 改为UTF-8 无BOM编码

随机推荐

  1. winserver-查看登陆日志

    Abstract 先要开启登陆审核,在查看登陆日志. 开启审核 运行 secpol.msc 日志查看 windowslog 下的security 管理员成功登陆后的eventid:4776,4648, ...

  2. 【原】无脑操作:HTML5 + CSS + JavaScript实现比赛排程

    1.背景:朋友请帮忙做一个比赛排程软件 2.需求: ① 比赛人数未知,可以通过文本文件读取参赛人员名称: ② 对参赛人员随机分组,一组两人,两两PK,如果是奇数人数,某一个参赛人员成为幸运儿自动晋级: ...

  3. Linux - 微软无线鼠标滚动过快问题

    Linux - 微软无线鼠标滚动过快问题 使用了一段时间的 Manjaro , 感觉相当不错, 但有一个蛋疼的地方就是每次滚动鼠标滚轮, 都会切换一页以上的页面, 总是有一部分看不到. 之前以为是 L ...

  4. Linux学习之路(三)Shell脚本初探

    本文参考链接:http://www.runoob.com/linux/linux-shell.html 基本说明 Shell脚本(shell script)是一种为shell编写的脚本程序.其中she ...

  5. docker 发布方式尝试

    docker 发布方式尝试 目前有个小项目, 尝试用docker的方式来发布, 项目只有一个节点, 使用 kubenate 有点小题大做, 所以采用docker-compose来发布. 发布过程 GI ...

  6. 从零开始制作 Hexo 主题

    原文地址:从零开始制作 Hexo 主题 · Ahonn 写在前面 本文将会从零开始开发一个简单的博客主题.样式主要参考 Hexo theme 中的 Noise 主题. 开始之前你需要了解: 模板引擎  ...

  7. Golang代码实现HTTPs(HTTPS证书生成和部署)

    在win7下试试: 1.实现一个最简单的HTTPS Web Server // gohttps/2-https/server.go package main import ( "fmt&qu ...

  8. KL散度、JS散度、Wasserstein距离

    1. KL散度 KL散度又称为相对熵,信息散度,信息增益.KL散度是是两个概率分布 $P$ 和 $Q$  之间差别的非对称性的度量. KL散度是用来 度量使用基于 $Q$ 的编码来编码来自 $P$ 的 ...

  9. MyEclipse不自动编译问题

    没图,别找了... 我在MyEclipse上从SVN中导项目,导下的项目跑不起来,发现tomcat的classes中是空文件夹. 以下是在网上找的其他方法: 1.确保:Project->buil ...

  10. 高橋君とカード / Tak and Cards AtCoder - 2037 (DP)

    Problem Statement Tak has N cards. On the i-th (1≤i≤N) card is written an integer xi. He is selectin ...