• 阿里云ssl证书NGINX配置https,wss


    server {
            listen       443;
            server_name  server.sentiger.com;
            ssl on;
            root /home/wwwroot/Service/beta/public;
            index index.html index.htm index.php;
            ssl_certificate   /etc/nginx/cert/1588339_server.sentiger.com.pem;
            ssl_certificate_key  /etc/nginx/cert/1588339_server.sentiger.com.key;
            ssl_session_timeout 5m;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
            ssl_prefer_server_ciphers on;
            location / {
                    if (!-e $request_filename){
                            rewrite ^(.*)$ /index.php last;break;
                    }
            }
    
            location ~ .+.php($|/) {
                    set $script    $uri;
                    set $path_info  "/";
                    if ($uri ~ "^(.+.php)(/.+)") {
                            set $script     $1; 
                            set $path_info  $2; 
                    }   
                    fastcgi_pass 127.0.0.1:9000;
                    fastcgi_index  index.php?IF_REWRITE=1;
                    include fastcgi_params;
                    fastcgi_param PATH_INFO $path_info;
                    fastcgi_param SCRIPT_FILENAME  $document_root$script;
                    fastcgi_param SCRIPT_NAME $script;
            }   
                location /ws/ {
                   index  index.html index.htm;
                  #proxy_pass http://127.0.0.1:9509;
                  proxy_pass http://127.0.0.1:9509/$is_args$args;
                  proxy_http_version 1.1;
                  proxy_connect_timeout 4s; #配置点1
                  proxy_read_timeout 600s; #配置点2,如果没效,可以考虑这个时间配置长一点
                  proxy_send_timeout 12s; #配置点3
                  proxy_set_header Upgrade $http_upgrade;
                  proxy_set_header Connection "Upgrade";
              }
    
              location /http/ {
                      proxy_pass http://127.0.0.1:9503/$is_args$args;
                      proxy_read_timeout 60s;
                      proxy_http_version 1.1;
                      proxy_set_header Upgrade $http_upgrade;
                      proxy_set_header Connection "upgrade";
              }
           error_page   500 502 503 504  /50x.html;
    }
    

      

  • 相关阅读:
    洛谷 P2915 [USACO08NOV]奶牛混合起来Mixed Up Cows 题解
    洛谷 P2687 [USACO4.3]逢低吸纳Buy Low, Buy Lower/ACWing 314 低买 题解
    7、Python异常
    必须要调整心态,积极起来,不能再偷懒
    5、Python函数
    10、Python数据库支持
    8、Python方法、属性、迭代器
    9、Python模块和标准库
    6、Python抽象的类
    UDP Linux编程(客户端&服务器端)
  • 原文地址:https://www.cnblogs.com/shiwenhu/p/10076246.html
Copyright © 2020-2023  润新知