zoukankan      html  css  js  c++  java
  • Nginx配置阿里云域名

    阿里云获取证书这里不描述。只记录Nginx操作

    在NginxC: ginx-1.10.3 ginx-1.10.3conf目录下新建文件夹,如:cert。配置阿里云证书的key,和pem文件

     之后在Nginx.conf文本中配置如下:

     server {
           listen 443 ssl;
           server_name lidsk.top;
            ssl_certificate   cert/6199992_lidsk.top.pem;
            ssl_certificate_key  cert/6199992_lidsk.top.key;
            ssl_session_timeout 5m;
            ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; #按照这个套件配置
            ssl_prefer_server_ciphers  on; 
        root /;
            location /{
                root   C:dist;
                index  index.html index.htm;
            }
    
            #error_page  404              /404.html;
    
            # redirect server error pages to the static page /50x.html
            #
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
    
            # proxy the PHP scripts to Apache listening on 127.0.0.1:80
            #
            #location ~ .php$ {
            #    proxy_pass   http://127.0.0.1;
            #}
    
            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            #
            #location ~ .php$ {
            #    root           html;
            #    fastcgi_pass   127.0.0.1:9000;
            #    fastcgi_index  index.php;
            #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            #    include        fastcgi_params;
            #}
    
            # deny access to .htaccess files, if Apache's document root
            # concurs with nginx's one
            #
            #location ~ /.ht {
            #    deny  all;
            #}
        }
    View Code

    路径对应新建文件夹中的文件

  • 相关阅读:
    二进制包安装MySQL数据库
    前端0:js,css基础
    前端2:工作涉及的问题及总结
    前端1:易混肴的前端知识,常用的方法或questions,及一点想法。
    微信小程序-上传多张图片加进度,持续修正中……
    JS 函数式编程
    敏捷开发总结
    数据绑定
    收藏
    transform,translate,transition 的区别
  • 原文地址:https://www.cnblogs.com/Ifyou/p/15479275.html
Copyright © 2011-2022 走看看