zoukankan      html  css  js  c++  java
  • Nginx一个server主机上80、433,http、https共存

    如果一站点既要80 http访问,又要443https访问。

    要让https和http并存,不能在配置文件中使用ssl on,配置listen 443 ssl;

    实例

    server
    {
        listen 80;
        listen 443 ssl;
        server_name www.iamle.com;
        index index.html index.htm index.php;
        root /home/wwwroot/www.iamle.com/;
        #ssl on; 这里要注释掉
        ssl_certificate /usr/local/nginx/conf/ssl/www_iamle_com.crt;
        ssl_certificate_key /usr/local/nginx/conf/ssl/www_iamle_com.key;
    
        #以下配置省略...
    }

    相关链接 :

      http://nginx.org/en/docs/http/configuring_https_servers.html#single_http_https_server

    相关文章:

      http://www.iamle.com/archives/1231.html

      http://www.cnblogs.com/kevingrace/p/6187072.html

  • 相关阅读:
    CF981D
    CF883H
    Hdu 5884
    全排列
    二叉搜索树实现
    my.ini配置详解
    主元素问题
    排序算法(还需补充)
    迷宫问题(DFS,BFS)
    算法导论4--求最大和数组
  • 原文地址:https://www.cnblogs.com/ifindu-san/p/7248693.html
Copyright © 2011-2022 走看看