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;
       }


  • 相关阅读:
    24/3=8 睡觉8工作8 8????
    linux上使用redis--宝塔面板
    Ruby--strftime
    JS-页面操作
    JS-确认框
    Rails--bundle exec rake db:migrate
    Jquery--array
    Ruby--hash
    Jquery--string
    Jquery--ajax
  • 原文地址:https://www.cnblogs.com/javawebsoa/p/3057315.html
Copyright © 2011-2022 走看看