zoukankan      html  css  js  c++  java
  • 通过Nginx*,IIS和apache 共用80端口

    #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  300;
        client_max_body_size 128M;
        server_names_hash_bucket_size 64;
        #gzip  on;
    
    server { 
    listen 80; 
    server_name   support.abc.com;
       location / {
           proxy_pass   http://localhost:82;
            }
    }
    
    server { 
    listen 80; 
    server_name abc.com;
       location / {
    
           proxy_pass   http://localhost:81;
    
            }
    
    }
    server { 
    listen 80; 
    server_name  www.abc.com;
       location / {
    
           proxy_pass   http://localhost:81;
    
            }
    
    }
        log_format  main  '$remote_addr -$upstream_addr- $remote_user [$time_local] $request '
                                    '"$status" $body_bytes_sent "$http_referer" '
                                    '"$http_user_agent" "$http_x_forwarded_for"';
    }

    把IIS和apache 设置不同端口,然后用上面的Nginx配置就可以了

  • 相关阅读:
    抱歉
    The area
    sort
    Problem D
    Problem B
    错排
    第8集 仪表开关电源照明原理图
    第7集 驱动与电气原理图绘制
    第6集 初步使用EPLAN部件库部件功能
    第5集 软件中建立项目结构
  • 原文地址:https://www.cnblogs.com/flyfish2012/p/4916682.html
Copyright © 2011-2022 走看看