zoukankan      html  css  js  c++  java
  • Nginx的安装SSL基本教程

    http://wiki.nginx.org/Modules#Standard_HTTP_modules 这里面带有所有基本的模块,及需要额外增加的模块

    1.安装带有ssl模块的 nginx

      wget http://nginx.org/download/nginx-0.8.52.tar.gz
      tar zxvf nginx-0.8.52.tar.gz
      chown root:root nginx-0.8.52 -R
      apt-get install libpcre3 libpcre3-dev
      apt-get install openssl
      apt-get install libssl-dev
      ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module  --with-http_realip_module
      make
      make install


     2.配置nginx 配置文件

       ssl on;
       ssl_certificate /etc/nginx/nginx_pas/*.crt;
       ssl_certificate_key /etc/nginx/nginx_pas/*.key;
    



    3. 配置nginx的conf ,所有都要求访问https
       

       location / {
                    rewrite ^/(.*) https://*.com/$1 permanent ;
                    #root   /var/www/nginx-default;
                    #index  index.html index.htm;
       }


  • 相关阅读:
    整理牙刷
    color 圆盘染色
    数论の一波流[长期更新]
    生成树
    一维黑白棋
    Factorials
    平面分割问题
    poj1183 反正切函数
    烽火传递
    校门外的树
  • 原文地址:https://www.cnblogs.com/javawebsoa/p/3057315.html
Copyright © 2011-2022 走看看