Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Web-Site and Web Application in IIS

Tags:

powershell

iis

Till date, I was thinking that we always create/host web-site in IIS. But I was going through powershell tutorial today which says it is different to create web-site and a web application.

This is the tutorial link (check different section on creating web site and application) -
http://learn.iis.net/page.aspx/433/powershell-snap-in-creating-web-sites-web-applications-virtual-directories-and-application-pools/

Can please guide what is the difference between the two.
Any example will be really helpful.

Thank you!

like image 528
inutan Avatar asked Dec 04 '22 02:12

inutan


1 Answers

A web site in IIS is the top level under Sites. The default one that is normally automatically created for you when installing IIS is named "Default Web Site".
This is the "root" that runs on port 80.
Under that, you can create virtual directories, which is basically sub-levels under the root web site, or you can create separate web applications that lives as separate applications under the root level.
A web application must live under a web site.

It is possible to create other web sites that can either be set up to run on other ports (i.e. 81), or to be named with a different host name which enables multiple sites to run on same port number. If named with a different host name, this name must be registered in a DNS server somewere to point to the IP address for your server. A workaround is also to to add it as an entry in the hosts file on the client computer that should access it.

This is example on how it looks in IIS Manager:

Example on web site and web application in IIS
Web site details

like image 196
awe Avatar answered Dec 06 '22 19:12

awe