简体   繁体   中英

Multiple websites under a folder in IIS

I have a problem with websites in IIS.

The first thing that I did was that I set basic .html website in IIS under Default website (port 80) . I moved the code in C:\\inetpub\\wwwroot\\Test and it works.

When I type in the browser localhost/Test , it works but I have an ASP.NET Core web app and I want to open it using localhost/MyAspNetSite in the browser. Is this possible???

I'm asking that because when I right click on the Default website I have no possibility to add new website, only virtual directory or application. In my case, I put my .net code in C:\\inetpub\\wwwroot\\New and in I added the new website on port 5000 and it works like localhost:5000 but not like localhost/New . I hope that you understand me.

Is it possible to have two websites on the same port or to connect two websites or something like that? I am sending image about this problem. Thank you

You can host multiple sites under the same IP Address. In this case, the IP Address is called "Shared IP Address". This concept is used by all the shared host providers in this world.

That you basically need to do is to go to your IIS -> click your domain -> Bindings -> and add "www.yourDomain.com" and "YourDomain.com" to the IP. If you have a second site, you just have to do exactly the same thing, you can check this blog post it can help u to understand all that things

http://woshub.com/run-multiple-websites-on-the-same-port-and-ip-address-on-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