安裝完IIS之后,在地址欄中輸入
http://localhost無(wú)法訪問(wèn):這時(shí)候應(yīng)該逐個(gè)排除可能發(fā)生這種現(xiàn)象的原因。
1、打開(kāi)Internert信息管理查看IIS是否啟動(dòng),且默認(rèn)網(wǎng)站時(shí)候已經(jīng)開(kāi)啟;
2、打開(kāi)http://127.0.0.1 看是否能訪問(wèn)IIS的默認(rèn)網(wǎng)頁(yè),能訪問(wèn)則說(shuō)明IIS已經(jīng)成功安裝到電腦上,可能是無(wú)法解析localhost;
3、開(kāi)始--命令(cmd)--ping localhost,看是否能ping通,從127.0.0.1上返回信息,如果成功則說(shuō)明可以解析localhost;
4、如果上一步不成功,則用記事本打開(kāi)C:\WINDOWS\system32\drivers\etc\hosts文件,看里面是否有包含:127.0.0.1 localhost ,如果沒(méi)有則將其添加進(jìn)去,再查看能否訪問(wèn)localhost。
5、嘗試將網(wǎng)站的主目錄指向另一個(gè)目錄或新建一個(gè)虛擬目錄,并在該新目錄創(chuàng)建一個(gè)新的網(wǎng)頁(yè)文件,如index.html,然后將其加到默認(rèn)網(wǎng)站的"文檔"項(xiàng)中作為默認(rèn)訪問(wèn)的網(wǎng)頁(yè),重新輸入網(wǎng)址:
http://localhost,看否能訪問(wèn)。
6、還是不行的話將IIS卸載掉,重新再安裝一次。
還有一種情況也會(huì)導(dǎo)致"無(wú)法訪問(wèn)localhost, 但可以訪問(wèn)127.0.0.1",這是我所遇到的,返回的信息如下:
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
Please try the following:
Click the Refresh button, or try again later.
Open the Web site home page, and then look for links to the information you want. If you believe you should be able to view this directory or page, please contact the Web site administrator by using the e-mail address or phone number listed on the Web site home page.
10061 - Connection refused
Internet Security and Acceleration Server
Technical Information (for support personnel)
Background:
The server you are attempting to access has refused the connection with the gateway. This usually results from trying to connect to a service that is inactive on the server.
ISA Server: XWProxy1.star-net.cn
Via:
Time: 2008-10-14 0:50:36 GMT
這是因?yàn)槲宜诓块T(mén)的電腦只能通過(guò)局域網(wǎng)內(nèi)主機(jī)做代理服務(wù)器來(lái)訪問(wèn)網(wǎng)絡(luò),在設(shè)置代理服務(wù)器的時(shí)候,未將"對(duì)于本地址不使用代理服務(wù)器(B)"打鉤,導(dǎo)致訪問(wèn)本地地址的時(shí)候也實(shí)驗(yàn)代理服務(wù)器,localhost只能被本地主機(jī)解析,代理服務(wù)器不能解析其他主機(jī)的localhost。只要將 Internet選項(xiàng)--鏈接--局域網(wǎng)設(shè)置--代理服務(wù)器 下的那個(gè)√打上就可以了。