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配置就可以了

  • 相关阅读:
    没有精神分裂的测试不是一个好家长
    防火墙中配置开放 8080端口--续上一篇
    rocketMQ(一)基础环境
    如何做一个对账系统
    通用对账系统介绍与设计(上)
    pdf转图片
    虚拟机加载类机制
    jenkins
    zookeeper和dubbo
    正则日常积累
  • 原文地址:https://www.cnblogs.com/flyfish2012/p/4916682.html
Copyright © 2011-2022 走看看