zyh3033 发表于 2018-11-11 11:05:39

(https)nginx - tomcat(http)

# egrep -v"#|^$" nginx.conf >nginx.conf.bak  
    # cp nginx.conf.baknginx.conf
  
    cp: overwrite `nginx.conf'? yes
  
    # cat nginx.conf
  
    user nginx nginx;
  
    worker_processes1;
  
    events {
  
       worker_connections1024;
  
    }
  
    http {
  
      include       mime.types;
  
      default_typeapplication/octet-stream;
  
      sendfile      on;
  
      keepalive_timeout65;
  
      server {
  
      listen         443 ssl;
  
      server_name    xuegod175.cn;#域名
  
      ssl_certificate      /usr/local/nginx/conf/server.crt;#证书路径
  
      ssl_certificate_key   /usr/local/nginx/conf/server.key;#key路径
  
ssl_session_cache    shared:SSL:1m; #s储存SSL会话的缓存类型和大小
  
ssl_session_timeout5m; #会话过期时间
  
ssl_ciphersHIGH:!aNULL:!MD5; #为建立安全连接,服务器所允许的密码格式列表
  
ssl_prefer_server_cipherson; #依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码
  
location /   {
  
          root   html;
  
          index    index.html index.htm index.php;
  
    }
  
    error_page   500 502 503 504/50x.html;
  
    location = /50x.html {
  
      root   html;
  
    }
  
      }
  
    }
  
    # /usr/local/nginx/sbin/nginx -s reload
  
    Enter PEM pass phrase:123456


页: [1]
查看完整版本: (https)nginx - tomcat(http)