nginx:[emerg]unknown directive "ssl"
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"的更多相关文章
- Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"
Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl" 出现如图所示错误,处理办法如下 去nginx解压目录下执行 ./co ...
- 错误提示 nginx: [emerg] unknown directive "gzip_static"
1.检查nginx配置文件错误提示如下: [root@server nginx]# /applications/nginx/sbin/nginx -t -c /applications/nginx/n ...
- 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 ...
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理
当我们在修改Nginx的配置文件,然后加载配置文件./nginx -s reload 报错类似的错误, nginx: [emerg] unknown directive “ ” in /usr/l ...
- 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 . ...
- 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 空格 , 换成正常的 ...
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/conf/vhost/XXX.conf:53报错处理
开发同事发给我一小段nginx配置,加到服务器上之后,执行nginx -s reload时,出现报错: nginx: [emerg] unknown directive “ ” in /usr/loc ...
- 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 ...
- 启动Nginx 出现 nginx: [emerg] unknown directive "锘?user" 错误
出现这种情况 一般是修改配置文件 nginx.conf 造成的 如果你修改文件后出现 那基本上就是这个原因 启动不了 重新打开 改为UTF-8 无BOM编码
随机推荐
- python中os模块和sys模块的常见用法
OS模块的常见用法 os.remove() 删除文件 os.rename() 重命名文件 os.walk() 生成目录树下的所有文件名 os.chdir() 改变目录 os.mkd ...
- 基于nginx搭建yum源服务器
1.首先关闭防护墙或者设置规则通过且关闭selinux 停止firewall systemctl stop firewalld 禁止firewall开机启动 systemctl disable f ...
- c语言static关键字的理解
static 一.概述 在c语言中static恰当的使用能让程序更加完美,细节上的严谨,代码会更好,也更利于程序的维护与扩展. 而static使用灵活,且又有两种完全无关的用法,所以整理总结一下. 二 ...
- eclipse中使用Lombok(转)
原文链接:https://www.cnblogs.com/justuntil/p/7120534.html windows环境 1.下载lombok.jar包https://projectlombok ...
- 基于Linux下catalog方式的 Oracle 备份策略(RMAN)
--********************************** -- 基于Linux下 Oracle 备份策略(RMAN) --******************************* ...
- 【js】js中判断对数是否为空
1.将json对象转化为json字符串,再判断该字符串是否为"{}" var data = {}; var b = (JSON.stringify(data) == "{ ...
- Redis进阶之使用Lua脚本开发
1.在Redis中使用Lua 在Redis中执行Lua脚本有两种方法:eval和evalsha. (1)eval eval 脚本内容 key个数 key列表 参数列表 下面例子使用了key列表和参数列 ...
- 随心测试_数据库_001<论数据的重要性>
测试工作中,数据的重要性 软测工程师:作为综合运用多学科知识,保障软件质量的重要岗位.需要我们学以致用,在工作中不断学习提升.以下:软测人员必备_数据库核心技能学习点,供大家学习参考. Q1:什么是: ...
- java 图片处理 base64编码和图片二进制编码相互转换
今天在弄小程序项目时,涉及上传图片的更改. 以下是代码: /** * -> base64 * @param imgFile * @return * @throws IOException */ ...
- JS Arry 常用方法总结
var arr = ["a", "b", "c", "1", "2", "3"] ...