如何指定特定IP給IIS server

如果一台server有多個IP address,且每個IP都有特定用途,如何指定特定IP給IIS Server?

在windows 2003 server提供一個設定工具:httpcfg,預設系統找不到這個工具,需要從windows 2003 server安裝光碟額外安裝support tool才有。

設定方式如下:

1. Click Start, and then click Run.
2. Type cmd, and then click OK to open a command prompt.
3. Type the following, where xxx.xxx.x.x is the IP address you want to add:
httpcfg set iplisten -i xxx.xxx.x.x
When this succeeds, Httpcfg returns the following:
HttpSetServiceConfiguration completed with 0

To view additional status codes, see the Httpcfg help.
4. After the IP address is added, use the following command to list it:
httpcfg query iplisten
Httpcfg returns the following:
IP :xxx.xxx.x.x
5. From the command prompt, stop the HTTP service and its dependent services. To do this, type the following string at the command prompt:
net stop http /y
6. From the command prompt, restart the HTTP service and it dependent services. To do this, type the following string at the command prompt:
net start w3svc
Note When you start w3svc, all services that were stopped when HTTP was stopped will start.

在MSDN裡有詳細描述 http://support.microsoft.com/kb/813368

相關文章

如何將電腦畫面經由 Chromecast 投放到電視螢幕上

Chrome 的檔案續傳功能

Mac與Android裝置傳輸檔案的方法

使用 Vysor 在電腦上控制 Android 裝置