zoukankan      html  css  js  c++  java
  • nginx 配置https

    #配置1http跳转https配置
    server {
        listen    80;
        server_name  xxx.com;#域名
        rewrite ^(.*)$ https://$host$1 permanent; 
    }
    
    #配置2https 443端口
    server {
        #listen   80;#去掉#号开启同时监听HTTP和HTTPS,根据访问协议自动调整(去掉配置1)
        listen       443 ssl;
        server_name  xxx.com;#域名
        root         /project;#项目目录
        #注意这里没有 ssl on
        ssl_certificate /xxx.pem;  # 指定证书的位置,绝对路径
        ssl_certificate_key /xxx.key;  # 绝对路径,同上
        ssl_session_timeout     5m;
        ssl_ciphers         ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
    
        location / {
            index index.html index.htm index.php;
            try_files $uri $uri/ /index.php?$args;
        }
    
        location ~ .php {
            root /project;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
            #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            #include fastcgi_params;
            #set $path_info "";
            #set $real_script_name $fastcgi_script_name;
            #if ($fastcgi_script_name ~ "^(.+?.php)(/.+)$") {
            #    set $real_script_name $1;
            #    set $path_info $2;
            #}
            #fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
            #fastcgi_param SCRIPT_NAME $real_script_name;
            #fastcgi_param PATH_INFO $path_info;
        }
    }
    
  • 相关阅读:
    创建索引
    列出所有的索引
    查看集群节点api
    集群健康检查api
    mapping 映射
    Elasticsearch 版本控制
    四种常见的 POST 提交数据方式
    HttpPost 传输Json数据并解析
    基本概念
    信用卡年轻消费群体数据分析和洞察报告
  • 原文地址:https://www.cnblogs.com/suli0827/p/14392748.html
Copyright © 2011-2022 走看看