简体   繁体   中英

How to Publish Website on IIS 7

I am able to publish website by creating virtual directory under Default Web Site in IIS 7. In this case url becomes http://localhost/ABC where ABC is my website and it is working fine. But I have to publish website at same level to Default Web Site , not under it. In this case url becomes http://ABC:81 where 81 is port number, but website is not working.
Can any body solve it?

Turn off the default web site and add yours to run on port 80. You can only run one web site on one port on one hostname at a time.

EDIT: After reading your post again, are you trying to access a different hostname for the second server? http://ABC:81 is not valid unless ABC is a valid hostname. Change that to http://localhost:81 to test your other site.

for local PC we can use only

IP: 127.0.0.1 & hostname: localhost

both redirect the to local PC if you use http://ABC.com it will be check on DNS. so plz set hostname localhost and port 81. so u can browse http://localhost:81 . or u can set IP 127.0.0.1 and port 81 in binding so u can browse with http://127.0.0.1:81 also

If you want to use it for test purposes you can go to c:\windows\systen32\drivers\etc and edit host file and you can add:

127.0.0.1 abc

Then you can access your website through http://abc . Or you may use 127.0.0.1 www.abc.com in place

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM