• nginx配置


    worker_processes 4;
    error_log logs/error.log crit; #日志位置和日志级别
    pid logs/nginx.pid;
    worker_rlimit_nofile 65535;
    events {
    worker_connections 65535;
    }
    http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    keepalive_timeout 65;
    # include /usr/local/nginx/conf/url.conf;
    upstream backend {
    #ip_hash;
    server 172.17.0.3:8080 weight=1 max_fails=2 fail_timeout=2;
    server 172.17.0.4:8080 weight=1 max_fails=2 fail_timeout=2;
    }
    server {

    listen 80;

    server_name localhost;
    ssl on;
    root html;
    index index.html index.htm;
    ssl_certificate cert/214031620150360.pem;
    ssl_certificate_key cert/214031620150360.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 / {

    #设置主机头和客户端真实地址,以便服务器获取客户端真实IP

    proxy_set_header Host $host;

    proxy_set_header X-Real-IP $remote_addr;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    #禁用缓存
    proxy_buffering off;

    #反向代理的地址

    proxy_pass http://backend;
    }
    location /sup {
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://172.17.0.5:8080/sup;
    proxy_connect_timeout 300s;
    proxy_read_timeout 300s;
    proxy_send_timeout 300s;
    proxy_buffer_size 64k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    proxy_ignore_client_abort on;
    }
    location /settle {
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://172.17.0.6:8080/settle;
    proxy_connect_timeout 300s;
    proxy_read_timeout 300s;
    proxy_send_timeout 300s;
    proxy_buffer_size 64k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    proxy_ignore_client_abort on;
    }


    }
    }

  • 相关阅读:
    php字符串练习题
    连接数据库报错的异常可以用mysqli_report来捕获
    nginx配置phpfpm虚拟主机站点
    php yield使用
    mysql8可以创建虚拟列作为公式映射字段
    【简记】Linux界面连接WPA2Enterprise Wifi
    云平台将故障Pod流量下线通用思路与OpenShift操作实战
    清空当前连接的Oracle数据库
    CAS学习笔记四:CAS单点登出流程
    【简记】SpringBoot禁用Swagger
  • 原文地址:https://www.cnblogs.com/Javame/p/6497503.html
Copyright © 2020-2023  润新知