Title: Internet Information Server (IIS)
1Internet Information Server (IIS) Domain Name
Server (DNS)
- David Turton
- Conestoga College
- Institute of Technology Advanced Learning
- www.conestogac.on.ca/dturton
- Doon 1D17 x3610
2Hosting Multiple Sites
- A single server can service multiple independent
web sites - 3 things identify each site
- IP address
- A network interface can have several IP addresses
- TCP port number
- Not a good one, since all browsers default http
to TCP port 80 - Host header (URL)
- Most common way of differentiating
- www.gopher.com
- engineering.gopher.com
- www.dave.on.ca
- SSL host header is in encrypted part of packet
- so must differentiate using ports and/or IP
addresses - Browsers default https to TCP port 443
- So multiple secure sites ? multiple IP addresses
on the server, usually - otherwise, user must specify the port in the URL
- https//secure.gopher.com8097
Can all be at same IP address, TCP port 80
3Default Web Site
- For all unassigned IPs port 80
- Any request that gets to the server knocks on
web services door - Unassigned IP
- not assigned to a specific site
- Get default if
- IP, port and URL don't all match a defined site
- or
- The site for a defined URL is disabled
4DNS Domain Name Service
- Forward lookup zone
- Resolves URLs into IP addresses
- multiple site names into one IP address
- Reverse lookup zone
- Resolves IP addresses to URLs
- Frequently not maintained
- Sites need to own their public IP address ranges
- Dynamic DNS (DDNS)
- Hosts (computers) register automatically
- Avoids using older WINS service
- Still need to manually add URLs for services
5DNS Lab Problems
- User must be in Administrators or DnsAdmins group
- Workaround for lab
- Added Domain Users group to DnsAdmins
6IIS Problems (using a central server)
- To create a site
- Member of servers local Administrators group
- Workaround for labs
- Created a user (iisAdmin)
- Placed in Administrators group
- Only available during class
- Use to create your site
- ? delegate site management to your admin group
7Creating a Web Site(Assuming 1 IP address, TCP
port 80)
- Decide on sites host header name (URL)
- Add URL to DNS
- If new domain add new zone to DNS
- Create site's root directory directory
structure - On this server or another server's file system
- If on another server, that server must run the
ASP.NET code - Virtual directories act as if theyre on this
server - Can actually be on a different drive or different
computer - On IIS Manager (as a local Administrator)
- Right-click Sites select Add Web Site
- Webmasters group users that maintain content
- Need read/write access to site's root folder
- Authenticated Users group
- Needs to traverse file to site's root folder
- Needs list read access to site's root folder
contents - Otherwise
- Will challenge for windows domain logon
8Add Zone (Domain) to DNS
- Primary maintained here
- Not a copy
- Add to AD
- Aids device searches
- Replication
- Depends on environment
9- Dynamic update
- Not necessary in lab
- We won't have computers in the new domain
10- Type A (address records)
- One way to locate the host that is servicing the
site - Sites IP is independent of server, can be moved
to another server
Computers servers of domain will add
automatically need to manually add the services
provided Web sites, IP cameras, etc.
11- CNAME canonical name
- Canonical an authority for
- Alias site's IP to server IP
- move server, site will follow
12- Alias result site in one zone linked to server
in another
13Connect to IIS Manageras "iisAdmin", a local
administrator
14Creating a New Web Site
Path to site's root folder
- One server can host multiple web sites
- A site is defined by
- Host name (URL)
- IP address
- TCP port
- If all 3 dont match a defined site, you get the
default site for the server - http//142.156.121.3 and http//cswin2k1.conestoga
c.on.ca - get the default URLs dont match a defined site
IP, port URL of site
15Note Path to site's root folder
- Could use UNC path
- Appears to be on another server
- (or could be moved to one)
- HTML is OK, but ASP.NET doesn't like it
- Gets "System.Web.AspNetHostingPermission"
- Use actual path on the server
- So can use local host's trust levels
16Permissions to site's folders
- Authenticated Users
- If has "read" permission
- Can run HTML ASP.NET
- Otherwise
- IUSR needs "read"
- and (Network Service or Service) needs "read"
- None of these need "list folder" to get to site's
main folder.
17Designating a Site Administrator(user or group)
18Connect as a Site Admin
19Admin Icons IIS 7
20IUSR userid used by IIS to read web pages. -
Deny this through NTFS and web users can't read.
- When users go into the site or its sub-folders,
these are the filenames IIS will look for. - First one found from this list wins.
- None found
- 403 Forbidden (tries to give a directory
listing)
21If default filenames aren't found, will provide a
listing of all files in the folder, if you enable
it. quite a security breach, though.
Do you want some features to be set by the site's
files, such as web.config? no ? set to "not
delegated"
22Virtual Directories(created by a local
administrator)
Folder name, as used by this site Physical path
to actual folder
- Folders located elsewhere
- In other folders, drives or computers
- Web pages access folder as if local to the site
- Uses
- Folders shared by multiple sites (corporate
images) - Departments maintain their part of company site
- Change one folder
- all sites referencing it change
Hmmm ... what if it's not in a share?
23Refresh Site to View Virtual Folder
24Example Virtual Folders
- Students did a site for a client
- Computer games
- Client already had a folder of images
- For another application
- Students were to use same images on their site
- To keep consistent current
- New modified images instantly available
- Student testing
- Used their own images folder in their site folder
- Deployment
- Dropped site's physical folder
- Created a virtual folder to client's images after
install
25Put it all together
- DNS resolves URL to servers IP
- IIS delivers URL's site instead of default
- Image from virtual folder
- Hmm ... forgot the browser title ... or I wanted
to display the URL?