You are on page 1of 11

Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

Lab Answer Key: Module 2: Configuring the Default


Website

Lab A: Configuring the Default Website for Public


Access

Exercise 1: Create DNS records for public and internal access to the
default website

Task 1: Configure DNS for the Default Website

1. Create a new A record in the Domain Name Service (DNS) zone Contoso.com. Use the
following settings:

• Name: WWW

• IP address: 192.168.3.51

a. Log on to LON-DC1. On the taskbar, click Server Manager.


b. In Server Manager, click the Tools menu, and then click DNS.
c. In the DNS Manager tree view, expand LON-DC1.
d. Under LON-DC1, expand Forward Lookup Zones, and then click Contoso.com.
e. In the menu bar, click the Action menu, and then click New Host (A or AAAA).
f. In the New Host dialog box, in the Name box, type WWW.
g. Note the Fully qualified domain name (FQDN).
h. In the IP address box, type 192.168.3.51.
https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 1 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

i. Click the Add Host button.


j. When the DNS confirmation dialog box appears, click OK.
k. In the New Host dialog box, click the Done button.
l. Verify that the Name, Type, and Data settings of the new A are correct.

2. Create a new A record in the DNS zone Contoso.pri. Use the following settings:

• Name: Internal

• IP address: 192.168.3.51
a. In the DNS Manager tree view, under Forward Lookup Zones, click the zone
contoso.pri.
b. In the menu bar, click the Action menu, and then click New Host (A or AAAA).
c. In the New Host dialog box, in the Name box, type Internal.
d. Note the Fully qualified domain name (FQDN).
e. In the IP address box, type 192.168.3.51.
f. Click the Add Host button.
g. When the DNS confirmation dialog box appears, click OK.
h. In the New Host dialog box, click the Done button.
i. Verify that the Name, Type, and Data settings of the new A record are correct.
j. Close DNS Manager.
k. Close Server Manager.

Task 2: Test the Website by using DNS Names

1. Test the default webpage by using the URL http://www.contoso.com.


a. Log on to LON-DC1. On the taskbar, click Internet Explorer.
b. If necessary, In the Internet Explorer 11 dialog box, select Use recommended
security and compatibility settings.

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 2 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

c. In the address bar, type http://www.contoso.com, and then press Enter.


d. Notice that the browser displays the IIS Windows Server default page. Compare
the URL in the address bar with the FQDN you wrote down earlier.
e. Close Internet Explorer.

2. Test the default webpage by using the URL http://internal.contoso.pri.


a. On the taskbar, click Internet Explorer.
b. In the address bar, type http://internal.contoso.pri, and then press Enter.
c. Notice that the browser displays the IIS Windows Server default page. Compare
the URL in the address bar with the FQDN you wrote down earlier.
d. Close Internet Explorer.

Result: After completing this exercise, you should have created the DNS records necessary
to make sure public and internal access to the default website hosted on LON-SVR1.

Exercise 2: Creating Webpages and Adding Web Application


Support

Task 1: Create a Webpage in the Default Website

1. Create and save a new webpage that uses the following:

• File name: Default.htm

• Location: c:\inetpub\wwwroot

• Content:

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 3 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

<p> The Default website on Lon-SVR1 </p>

a. Log on to LON-SVR1, and then click Start.


b. On the Start screen, type Notepad, and then press Enter.
c. In Notepad, type the following.-

<p> The Default website on Lon-SVR1 </p>

d. In the menu bar, click File, and then click Save As.
e. In the Save As dialog box, click File name, and then delete *.txt.
f. In the File name box, type c:\inetpub\wwwroot\default.htm.
g. Click the Save button.
h. Close Notepad.

2. Test the new webpage.


a. Log on to Lon-DC1, and on the taskbar, click Internet Explorer.
b. In the address bar, type http://www.contoso.com.
c. Notice that the browser displays the webpage you created.
d. Close Internet Explorer.

Task 2: Add the ASP Component

1. Copy the Testpage.asp file from C:\Sites\Default to C:\inetpub\wwwroot.


a. Log on to LON-SVR1, and on the taskbar, click File Explorer.
b. In the tree view of File Explorer, expand This PC.
c. Under This PC, expand Local Disk (C:).

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 4 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

d. Under Local Disk (C:), expand Sites.


e. Under Sites, click Default.
f. In the list of files and folders, right-click Testpage.asp, and then click Copy.
g. Under Local Disk (C:), expand inetpub, and then click wwwroot.
h. Right-click in the file and folders pane, and then click Paste.
i. Close File Explorer.

2. Add the ASP role service.


a. Log on to LON-SVR1, and on the taskbar, click Server Manager.
b. Click the Manage menu, and then click Add Roles and Features.
c. On the Before you begin page, click Next.
d. On the Select installation type page, verify that the installation type Role-based
or feature-based installation is selected, and then click Next.
e. On the Select destination server page, verify that Select a server from the server
pool is selected; in the Server Pool, verify that LON-SVR1.contoso.pri is
selected; and then click Next.
f. On the Select server roles page, under Roles, expand the Web Server (IIS) role.
g. Expand Web Server, and then expand Application Development.
h. Click ASP, and then click Next.
i. On the Select features page, click Next.
j. On the Confirm installation selections page, click Install.
k. When the Feature installation has succeeded, click Close to close the Add Roles
And Features Wizard.
l. Close Server Manager.

3. Verify Testpage.asp.
a. Log on to LON-DC1, and on the taskbar, click Internet Explorer.
b. In the address bar, type http://www.contoso.com/Testpage.asp.
c. Notice that the browser displays Testpage.asp.

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 5 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

d. Note the IIS Version, Application Physical Path, and Application Path.
e. Close Internet Explorer.

Result: After completing this exercise, you should have created a simple test webpage and
added support for a dynamic server-side web application language.

Lab B: Creating Virtual Directories and Applications

Exercise 1: Creating Folders, Virtual Directories, and Applications

Task 1: Add a Folder to the Default Website

1. Create a new folder in the default website on LON-SVR1.

• Name: DefaultSite_Docs

• Location: c:\inetpub\wwwroot
a. Log on to LON-SVR1, and on the taskbar, click File Explorer.
b. In the tree view, expand This PC.
c. Under This PC, expand Local Disk (C:).
d. Under Local Disk (C:), expand inetpub, and then click wwwroot.
e. Right-click in the file and folders pane, click New, and then click Folder.
f. Name the new folder DefaultSite_Docs.

2. Copy the content to the DefaultSite_Docs folder.


a. In the tree view of File Explorer, under Local Disk (C:), expand Sites, and then
expand Default.

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 6 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

b. Click the folder DefaultSite_Docs.


c. In the list of files and folders, right-click Default.htm and Testpage.asp, and then
click Copy.
d. Under Local Disk (C:), expand inetpub, and then expand wwwroot.
e. Click the folder that you created earlier, named DefaultSite_Docs.
f. In the file and folders pane, right-click and then click Paste.
g. Close File Explorer.

3. Verify the new content by using the appropriate URL.


a. On the taskbar, click Internet Information Services (IIS) Manager.
b. In the Connections pane, expand LON-SVR1, expand Sites, expand Default Web
Site, and then click the DefaultSite_Docs folder.
c. Notice the icon for the folder.
d. Close Internet Information Services (IIS) Manager.
e. Log on to LON-DC1, and on the taskbar, click Internet Explorer.
f. In the address bar, type http://www.contoso.com/defaultsite_docs.
g. Notice that the browser displays the default page from the DefaultSite_docs folder.
h. Close Internet Explorer.

Task 2: Add a Virtual Directory to the Default Website

1. Create a virtual directory in the default website by using the following information:

• Alias: Photos

• Physical Path: C:\Sites\Default\DefaultSite_Photos

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 7 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

a. Log on to LON-SVR1, and on the taskbar, click Internet Information Services (IIS)
Manager.
b. In the Connections pane, expand LON-SVR1, expand Sites, and then expand
Default Web Site
c. Right-click Default Web Site, and then click Add Virtual Directory.
d. In the Add Virtual Directory dialog box, click Alias, and then type Photos.
e. Click Physical Path, and then type C:\Sites\Default\DefaultSite_Photos.
f. Click OK.
g. In the Connections pane of Internet Information Services (IIS) Manager, under the
Default Web Site, notice and note the name of the virtual directory. Notice its icon.
h. Close Internet Information Services (IIS) Manager.

2. Test the new virtual directory by using the appropriate URL.


a. Log on to LON-DC1, and on the taskbar, click Internet Explorer.
b. If necessary, In the Internet Explorer 11 dialog box, select Use recommended
security and compatibility settings.
c. In the address bar, type http://www.contoso.com/Photos.
d. Notice that the browser displays the default page from the Photos virtual directory.
e. Close Internet Explorer.

Task 3: Add a Web Application to the Default Website

1. Create an application in the default website by using the following information:

• Alias: OrderApp

• Application Pool: DefaultAppPool

• Physical Path: C:\Sites\Default\DefaultSite_OrderApp

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 8 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

a. Log on to LON-SVR1, and on the taskbar, click Internet Information Services


(IIS) Manager.
b. In the Connections pane, expand LON-SVR1, expand Sites, and then expand
Default Web Site.
c. Right-click Default Web Site, and then click Add Application.
d. In the Add Application dialog box, click Alias, and then type OrderApp.
e. Click Physical Path, and then type C:\Sites\Default\DefaultSite_OrderApp.
f. Click OK.
g. In the Connections pane of Internet Information Services (IIS) Manager, under the
Default Web Site, notice and note the name of the application. Notice its icon.
h. Close the Internet Information Services (IIS) Manager.

2. Test the new application by using the appropriate URL


a. Log on to LON-DC1, and on the taskbar, click Internet Explorer.
b. In the address bar, type http://www.contoso.com/OrderApp.
c. Notice that the browser displays the default page from the OrderApp application.
d. Close Internet Explorer.

Task 4: Convert a Virtual Directory to an Application

1. In the default website, convert the Photos virtual directory to an application by using the
following information:

• Alias: Photos

• Application Pool: DefaultAppPool

• Physical Path: C:\Sites\Default\DefaultSite_Photos

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…onFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 9 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

a. Log on to LON-SVR1, and on the taskbar, click Internet Information Services


(IIS) Manager.
b. In the Connections pane, expand LON-SVR1, expand Sites, and then expand
Default Web Site.
c. Right-click the Photos virtual directory, and then click Convert to Application.
d. In the Add Application dialog box, verify that the application was assigned to the
Application Pool: DefaultAppPool.
e. Click OK.
f. Click OK to dismiss the error message that appears.
g. Click on Default Web Site
h. Press F5
i. In the Connections pane of Internet Information Services (IIS) Manager, under the
Default Web Site, notice the new application Photos and the change to the icon.
j. Close Internet Information Services (IIS) Manager.

2. Test the new application by using the appropriate URL.


a. Log on to LON-DC1, and on the taskbar, click Internet Explorer.
b. In the address bar, type http://www.contoso.com/Photos.
c. Notice that the browser displays the default page from the Photos application.
d. Close Internet Explorer.

Task 5: To prepare for the next module

1. When you finish the lab, revert the virtual machines to their initial state. To do this,
follow these steps:
a. On the host computer, start Hyper-V Manager.
b. In the Virtual Machines list, right-click 10972B-LON-DC1, and then click
Shutdown.

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…nFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 10 of 11
Lab Answer Key: Module 2: Configuring the Default Website 11/29/15, 10:37 PM

c. In the Shut Down Machine dialog box, click Shut Down.


d. After the virtual machine has completely shut down, in the Virtual Machines list,
right-click 10972B-LON-DC1, and then click Revert.
e. In the Revert Virtual Machine dialog box, click Revert.
f. Perform steps b through e for 10972B-LON-SVR1.

Result: After completing this exercise, you should have created new folders, virtual
directories, and applications.

https://skillpipe.com/reader/en-GB/Book/BookPrintView/484558e7-2713-45ea-8f…nFilterOwn=false&AnnotationFilterTeacher=false&AnnotationFilterClass=false Page 11 of 11

You might also like