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

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

  • 相关阅读:
    DeWeb 与 Unigui的区别
    DeWeb 电脑和手机动态适配
    DeWeb --- Hello,World!
    DeWeb 简介
    Android ---------- 汉字空格
    Android ---------- List 数组转成 json格式的字符串
    Android ---------- TabLayout 实战 (一)
    Thinkphp5.0中input函数用法
    jQuery在页面加载的时候自动调用某个函数的方法(转载)
    关于wampserver的一点知识
  • 原文地址:https://www.cnblogs.com/Ifyou/p/15479275.html
Copyright © 2011-2022 走看看