多IP配置IIS7和Apache共享80端口
2011-06-25 12:58
477 查看
1) Added or make sure your machine has two ip's
2) Open a command prompt
3) Type netsh
4) Type http
5) Type sho iplisten. It should be blank
6) Type add iplisten ipaddress=192.168.0.90
You should get IP address successfully added
7) Type sho iplisten again
It should sho 192.168.0.90 in the list
8) Type exit to get out of netsh
9) Type type netstat -an. See if you notice 192.168.0.90:80 in the list. If you see 0.0.0.0:80, do an iisreset
10) Download and install Apache ( I did it with 2.2.4)
http://mirror.nyi.net/apache/httpd/binaries/win32/apache_2.2.4-win32-x86...
11) Do a default install,
12) Open httpd.conf and adjust the ip listen to 192.168.0.91:80
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
#Was 80
#Change to
Listen 192.168.0.91:80
12) Restart the Apache service. (for some reason the start / stop thing didn't work for me, I used net stop apache2 net start apache2.)
13) Type netstat -an
14) You should see 192.168.0.90:80 and 192.168.0.91:80. Open a browser and test both IP's to see if IIS7 and Apache come up.
15) Test restarting Apache service to see if it works after that.
16) Turn off Apache, browse IIS, turn of IIS, browse Apache. Test it every which way to see if it works.
最后,记得在Windows Server 2008 R2的服务器上为apache添加防火墙例外规则
2) Open a command prompt
3) Type netsh
4) Type http
5) Type sho iplisten. It should be blank
6) Type add iplisten ipaddress=192.168.0.90
You should get IP address successfully added
7) Type sho iplisten again
It should sho 192.168.0.90 in the list
8) Type exit to get out of netsh
9) Type type netstat -an. See if you notice 192.168.0.90:80 in the list. If you see 0.0.0.0:80, do an iisreset
10) Download and install Apache ( I did it with 2.2.4)
http://mirror.nyi.net/apache/httpd/binaries/win32/apache_2.2.4-win32-x86...
11) Do a default install,
12) Open httpd.conf and adjust the ip listen to 192.168.0.91:80
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
#Was 80
#Change to
Listen 192.168.0.91:80
12) Restart the Apache service. (for some reason the start / stop thing didn't work for me, I used net stop apache2 net start apache2.)
13) Type netstat -an
14) You should see 192.168.0.90:80 and 192.168.0.91:80. Open a browser and test both IP's to see if IIS7 and Apache come up.
15) Test restarting Apache service to see if it works after that.
16) Turn off Apache, browse IIS, turn of IIS, browse Apache. Test it every which way to see if it works.
最后,记得在Windows Server 2008 R2的服务器上为apache添加防火墙例外规则
相关文章推荐
- Apache2.4和IIS7整合,共享80端口测试
- Windows Server里80端口与多IP绑定(可实现IIS与Apache共享80端口)
- Apache2.4和IIS7整合共享80端口测试
- 配置基于域名、IP、端口号的Apache服务器
- nginx+apache单IP多站点反向代理配置
- 利用Apache进行单IP多域名配置
- PHP XAMPP配置PHP环境和Apache80端口被占用解决方案
- Apache 配置虚拟主机之3--基于IP+Port结合
- apache基于IP,port和域名三种虚拟主机配置方法
- APACHE中如何在同一个IP配置两个虚拟主机
- Ubuntu Apache 2.4 配置-虚拟站点、禁止IP访问
- 怎样配置让apache访问日志记录真实客户端IP,而不是nginx代理服务器IP
- 在配置load balance时,真实的ip在apache log 中无法记录的问题
- 关于apache下同IP多域名支持HTTPS和80跳转HTTPS的配置
- IIS与Apache共用80端口方法,如何让iis和apache共享80端口
- apache虚拟主机的配置,一个IP绑定多个域名
- Apache 配置虚拟主机之3--基于IP+Port结合 推荐
- Apache中配置支持CORS(跨域资源共享)实例
- apache同一ip多端口的配置
- 一个ip一个阿里云服务器配置多个网站之Apache配置