zoukankan      html  css  js  c++  java
  • nginx简单配置

    #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;
        gzip  on;
    	upstream beiwai_proxy {   
    	    server 47.92.159.190:8080 weight=1 max_fails=2 fail_timeout=30s;   
    	}
        server {
            listen       80;
            server_name  static.cnblog.com;
    	location / {
    	   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_set_header Upgrade $http_upgrade;  
    	    proxy_set_header Connection "upgrade";
             client_max_body_size    102400m;
                 proxy_pass http://beiwai_proxy;	
            }
    	location ^~ /static/ {
                alias	E:/ftp_dir/;
            }
    	location ^~ /audio/ {
                alias	E:/ftp_dir/audio/;
            }
        }
    }
    #proxy_set_header Upgrade $http_upgrade;   websocket
    #proxy_set_header Connection "upgrade";    websocket
    #proxy_set_header HOST $host;    静态资源路径问题
    #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;    静态资源路径问题
  • 相关阅读:
    Java使用printf格式化日期
    Java时间Date类
    Java数组
    Spring Cloud Stream
    Spring Cloud Bus
    Spring Cloud Config
    api服务网关?
    SPRINGBOOT集成SWAGGER2
    MySQL锁(一)全局锁:如何做全库的逻辑备份?
    Spring的FactoryBean
  • 原文地址:https://www.cnblogs.com/kongxianghao/p/8607541.html
Copyright © 2011-2022 走看看