通过Nginx反向代理,IIS和apache 共用80端口
2015-10-28 11:04
731 查看
#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配置就可以了
相关文章推荐
- 透明代理和反向代理
- nginx之反向代理
- 【nginx网站性能优化篇(2)】反向代理实现Apache与Nginx的动静分离(LNMPA)
- 基于Apache做为Tomcat前端的架构实现反向代理&&负载均衡
- 用node.js替代nginx做反向代理
- 第 四 十 天:squid 代 理 一 些 配 置
- Java 反向代理J2EP
- 使用nginx简单实现反向代理和负载均衡
- Nginx反向代理的端口总是80的问题
- 多级反向代理下,Java获取请求客户端的真实IP地址多中方法整合
- Ubuntu中配置squid代理
- nginx + tomcat 部署反向代理加负载均衡
- squid for WIN + DNSPOD 搭建CDN服务器手记
- varnish/squid/nginx cache 有什么不同?
- Nginx 反向代理Apache
- Squid Proxy Server 3.1
- 多级反向代理下,Java获取请求客户端的真实IP地址方法整合
- Nginx反向代理和负载均衡部署指南
- Nginx反向代理和负载均衡部署指南
- Web前端性能优化之反向代理