简体   繁体   中英

Deploying my website to the pulic using IIS and windows server

I recently bought a domain. Let's say my domain is "domain.com", and I made a website in visual web dev. using ASP.NET and VB.NET. I also have an old computer that I turned into a home server so I installed windows server 2008 R2 SP2. So I uploaded my website to a folder and went to the IIS manager. There I added a website, set the sitename to "domain.com" application pool to "ASP.NET v4.0". Then the physical path to: "c:\\websites\\wwwroot\\domain.com" then in the bindings I added 3 different things.

type   hostname     port   IP adress
http www.domain.com  80   my IP found at www.what'smyip.com
http domain.com      80   my IP found at www.what'smyip.com
http   *blank*       80   192.168.1.6(my server's internal IP)

I made sure port 80 is open in my router and I added a firewall inbound rule for port 80.

When I connect using 192.168.1.6 I get my website and everthing works like it should.

However when I connect using domain.com or www.domain.com I see a 404 page. http://prntscr.com/42ynf4

Also when I change my bindings and I change the IP for domain.com and www.domain.com like displayed below:

type   hostname     port   IP adress
http www.domain.com  80   192.168.1.6(my server's internal IP)
http domain.com      80   192.168.1.6(my server's internal IP)
http   *blank*       80   192.168.1.6(my server's internal IP)

It works just like it's supposed to?

I have done a DNSlookup on the domain and it's active. I'm a little bit stuck on this and I know you guys aren't experts on hosting but you all probably have more knowledge about this then I do.

You should check what is the server IP address (netstat), because you could use a proxy and then the Internet IP info will be not correct. Also, make sure that you set the correct home page in IIS.

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