当前位置:   article > 正文

nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/con.d/xxx.conf:8

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

给阿里云服务器(Centos6.8 64位)配置https,安装证书的时候,报错了:

nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/con.d/xxx.conf:8

大概意思是找不到或者,没有安装OpenSSL,但是我whereis openssl,是能找到的,那应该就是没有配置openssl,

然后就重新配置一下:

  1. 进入Nginx安装目录:cd /usr/local/src/nginx-1.10.3
  2. ./configure --with-http_ssl_module
  3. make
  4. cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak,然后输入Y
  5. 覆盖旧的:cp objs/nginx /usr/local/nginx/sbin/nginx
  6. 测试一下是否成功:/usr/local/nginx/sbin/nginx -t ,如图代表成功
  7. 重启Nginx(cd /usr/local/nginx/sbin,./nginx -s reload)
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/71859
推荐阅读
相关标签
  

闽ICP备14008679号