1. /usr/local/nginx/sbin/nginx -V 查看nginx版本与编译安装了哪些模块
nginx version: nginx/1.10.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments:
注意是V。v只显示版本号

2. 下载nginx 1.10.3, 并且configure
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

3. 执行make ,千万不要make install 否则会覆盖现有的nginx

4. 关闭nginx

5. copy  ~/download/nginx-1.10.3/objs/nginx 到现有的/usr/local/nginx/sbin/nginx

6. /usr/local/nginx/sbin/nginx -V 查看编译安装的模块
nginx version: nginx/1.10.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled

configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

7. 修改nginx.conf文件

server {
  server_name xxx.yyy.com;
  listen 443;
  ssl on;
  ssl_certificate /usr/local/nginx/conf/xxx.com_server.txt; #公钥
  ssl_certificate_key /usr/local/nginx/conf/xxx.com_private.txt; #私钥

location / {
      # location的一堆配置
      # 
      #
      # ################
  }

error_page   500 502 503 504  /50x.html;
  location = /50x.html {
      root   html;
  }
}
###########################80端口的处理###############################
server {
  listen 80;
        server_name  xxx.yyy.com;
        send_timeout 1800;

rewrite ^(.*)$  https://xxx.yyy.com$1 permanent; # 80端口跳转
}

在已经安装的nginx上,增加ssl模块的更多相关文章

  1. 如何在已经安装好的Nginx上增加新模块

    学习资源: https://blog.csdn.net/dxm2025/article/details/41149865 https://blog.csdn.net/qq_36663951/artic ...

  2. 给已安装的NGINX添加新的模块

    给已安装的NGINX添加新的模块 2018-11-16 14:02:45   Visit  0 使用 nginx -V 查看当前nginx的信息,包括版本号和configure编译配置信息 版本号 : ...

  3. Nginx下配置SSL模块,支持https

    Http与Https的区别 HTTP:是互联网上应用最为广泛的一种网络协议,是一个客户端和服务器端请求和应答的标准(TCP),用于从WWW服务器传输超文本到本地浏览器的传输协议,它可以使浏览器更加高效 ...

  4. ubuntu下安装python3.6.5导入ssl模块失败

    1.问题 python安装完毕后,提示找不到ssl模块: [root@localhost ~]# python3 Python ( , ::) [GCC (Red Hat -)] on linux2 ...

  5. nginx上通过ssl证书将http转发为https

    环境:阿里云linux,ngnix 1.16.0 ,ssl证书,XXXX.jar 0.自行在阿里云上下载免费的ssl证书.里面有2个文件.key和pem后面要用到. 1.首先将项目在linux上跑起来 ...

  6. 【踩坑】Nginx上配置ssl证书实现https访问

    昨天开始为域名挂上ssl证书,使得可以以https去访问服务器.按照网上所介绍的配置Nginx,然而一直访问不了网站. 第二天排查了一早上,发现不单要配置Nginx,阿里云上安全组要开启443端口,并 ...

  7. 在已编译安装nginx上动态添加模块

    一.添加nginx模块 找到安装nginx的源码根目录,如果没有的话下载新的源码 wget http://nginx.org/download/nginx-1.8.1.tar.gz 查看ngixn版本 ...

  8. nginx 动态添加ssl模块

    一.查看nginx模块 /usr/local/nginx/sbin/nginx -V 二.安装openssl包 yum -y install pcre  pcre-devel zlib  zlib-d ...

  9. Gerrit增加SSL证书

    在http的基础上增加SSL 配置gerrit.config文件 [gerrit] basePath = git canonicalWebUrl = https://172.16.99.212/ .. ...

随机推荐

  1. [转]Cordova - 彻底搞定IOS编译!

    本文转自:https://www.cnblogs.com/sunylat/p/9946482.html 操作系统:OSX10.14 XCode:10.1 Cordova:8.1.2 假设已经配置好了C ...

  2. Url的Base64编码以及解码

    Base64可以将二进制转码成可见字符方便进行http传输,但是base64转码时会生成“+”,“/”,“=”这些被URL进行转码的特殊字符,导致两方面数据不一致.我们可以在发送前将“+”,“/”,“ ...

  3. Git Extensions 和 Tortoisegit 到底是什么?Git For VS(Git For Visual Studio)(Visual Studio 中使用 Git)

    前言: 我们使用 Git 作为版本控制的朋友们,一定都熟悉 Git Extensions 和 Tortoisegit 两款工具,但是对于初学者,可能就不那么了解了. 当然如果有幸,你接触过 SVN , ...

  4. 扩展RBAC用户角色权限设计方案(转载)

    扩展RBAC用户角色权限设计方案  来源:https://www.cnblogs.com/zwq194/archive/2011/03/07/1974821.html https://blog.csd ...

  5. python中的魔法属性

    目录 1. __doc__ 2. __module__ 和 __class__ 3. __init__ 4. __del__ 5. __call__ 6. __dict__ 7. __str__ 8. ...

  6. c3p0链接池配置使用

    c3p0链接池初步使用:直接上代码 c3p0是开源面粉的连接池,目前使用它的开源项目主要有:Spring,Hibernate等,使用时需要导入相关jar包及配置文件c3p0-config.xml文件 ...

  7. mapper代理开发步骤

    1:先写Mapper接口,UserMapper.java 2:然后遵循4条开发规范,写映射文件,UserMapper.xml 3:将映射文件,UserMapper.xml加入到SqlMapConfig ...

  8. vuejs2.0与1.x版本中怎样使用js实时访问input的值的变化

    vuejs 2.0中js实时监听input 在2.0的版本中,vuejs把v-el 和 v-ref 合并为一个 ref 属性了,可以在组件实例中通过 $refs 来调用.这意味着 v-el:my-el ...

  9. 使用 Python

    使用 Python Python 官网及镜像 官网:https://www.python.org/ 镜像:http://npm.taobao.org/mirrors/python/ 安装玩Python ...

  10. Android 自定义AlertDialog的实现

    Android默认的AlertDialog太单调,我们可以通过继承原生的Dialog来实现自定义的Dialog. 本文的自定义Dialog和原生的AlertDialog的创建方式类似,通过一个静态Bu ...