zoukankan      html  css  js  c++  java
  • cent0s6安装nginx小程序https

    1.yum -y install gcc pcre-devel zlib-devel openssl openssl-devel

    2.nginx下载地址:https://nginx.org/download/

    3.wget链接地址

    4.tar -zxvf nginx-1.9.9.tar.gz

    5../configure --prefix=/usr/local/nginx  (如果需要ssl)

    6.make 编译
    7.make install 安装

    8.附一个HTTPS 配置

    #user  nobody;
    worker_processes  1;
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    #pid        logs/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
    
        #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
        #                  '$status $body_bytes_sent "$http_referer" '
        #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
        #access_log  logs/access.log  main;
    
        sendfile        on;
        #tcp_nopush     on;
    
        #keepalive_timeout  0;
        keepalive_timeout  65;
    
        #gzip  on;
    
    
    
    
        # another virtual host using mix of IP-, name-, and port-based configuration
        #
        
      server{
            listen 80;
            server_name iot.****.***.cn;
            
            location / {
     #             proxy_pass  http://127.0.0.1:8001/;
               root   /usr/application/dist;
               index  index.html index.htm;
            }
    #        rewrite ^/(.*)$ https://iot.allsheng.com.cn:443/$1 permanent;
        }
    
        # HTTPS server
        #
        server {
            listen       443  ssl;
            server_name  ***.***.com.cn;
            ssl on;
            ssl_certificate      /usr/application/3681500_iot.allsheng.com.cn.pem;
           ssl_certificate_key  /usr/application/3681500_iot.allsheng.com.cn.key;
            ssl_protocols         TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache    shared:SSL:1m;
            ssl_session_timeout  5m;
    
            ssl_ciphers  HIGH:!aNULL:!MD5;
            ssl_prefer_server_ciphers  on;
    
            location / {
                  proxy_pass  http://127.0.0.1:8001/;
     #          root   /usr/application/dist;
     #          index  index.html index.htm;
            }
        }
    
    }

    9.相关命令

      1.nginx -s stop

      2.nginx -s reload

  • 相关阅读:
    loadrunner实现字符串的替换
    Windows Server 2008 R2 实现多用户同时登陆
    LoadRunner测试场景中添加负载生成器
    loadrunner统计字符串中指定字符出现的次数
    loadrunner怎么将变量保存到参数中
    loadrunner生成随机数
    loadrunner取出字符串的后面几位
    loadrunner参数化excel数据
    LoadRunner常用函数列表
    loadrunner解决在项目中的难点解决
  • 原文地址:https://www.cnblogs.com/xyzxy/p/12608930.html
Copyright © 2011-2022 走看看