Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Module 2: Overview of IIS 7.0 Application Server (http://quantrinet.com/forum/forumdisplay.php?f=264)
-   -   Internet information services (iis) 7.0 (http://quantrinet.com/forum/showthread.php?t=2907)

hoctinhoc 26-06-2009 10:49 AM

Internet information services (iis) 7.0
 
INTERNET INFORMATION SERVICES (IIS) 7.0














Trần Thủy Hoàng
http://msopenlab.com/uploads/user_picture_3.JPG
Hoang is a MCT, MCITP-EA, MCITP Enterprise Messaging, MCSE (+Messaging +Security), with specialized in security, messaging and with over 10 years experience as an IT professtional. He is the founder of MSOpenLab website, and wants to share Microsoft technology to all.


View Profile >
http://msopenlab.com/uploads/thumb_i...71.jpgC1Fk.gif
INTERNET INFORMATION SERVICES (IIS) 7.0
I. Mục đích
- Giới thiệu cách cài đặt và cấu hình IIS 7.0
- Bài lab bao gồm các bước

1. Cài đặt Web Server (IIS) role
2. Khảo sát Default Web Site
3. Hosting Web Site trên IIS 7.0
4. Cấu hình Virtual Directory
5. Hosting nhiều Web Site trên 1 Web Server
6. Cấu hình Secure Socket Layer (SSL) cho Web Site

II. Chuẩn bị

- Một máy Windows Server 2008
- Cài đặt DNS Server role
- Cấu hình DNS Server:
+ Tạo Dynamic Forward Lookup Zone: nhatnghe.com
+ Tạo Alias www.nhatnghe.com
- Sử dụng lệnh nslookup, kiểm tra đã phân giải thành công www.nhatnghe.com

III. Thực hiện

1. Cài đặt Web Server (IIS) role
- Mở Server Manager từ Administrative tools
- Trong cửa sổ Server Manager, Right click Role, chọn Add Roles

http://www.msopenlab.com/lab/iis/h1.jpg
- Trong cửa sổ Before You Begin chọn Next

http://www.msopenlab.com/lab/iis/h2.jpg

- Trong cửa sổ Select Server Roles, đánh dấu chọn vào mục Web Server (IIS)

http://www.msopenlab.com/lab/iis/h3.jpg

- Trong hộp thoại Add Roles Wizard chọn Add Required Features

http://www.msopenlab.com/lab/iis/h4.jpg

- Trong cửa sổ Select Server Roles chọn Next

http://www.msopenlab.com/lab/iis/h5.jpg

- Trong cửa sổ Web Server (IIS) chọn Next

http://www.msopenlab.com/lab/iis/h6.jpg

- Trong cửa sổ Select Role Services chọn Next

http://www.msopenlab.com/lab/iis/h7.jpg

- Trong cửa sổ Confirm Installation Selections chọn Install

http://www.msopenlab.com/lab/iis/h8.jpg

- Sau khi quá trình cài đặt hoàn tất, chọn Close
- Trong cửa sổ Server Manager, kiểm tra đã cài đặt thành công Web Server (IIS) role

http://www.msopenlab.com/lab/iis/h9.jpg

2. Khảo sát Default Web Site
- Mở Internet Information Services (IIS) Manager từ Administrative Tools
- Trong cửa sổ Internet Information Services (IIS) Manager, bung Web Server, bung Site, Right click Default Web Site, chọn Manage Web Site, chọn Advanced Setting…

http://www.msopenlab.com/lab/iis/h10.jpg

- Trong hộp thoại Advanced Settings, kiểm tra database của Default Web Site đang lưu trữ tại đường dẫn %SystemDriver%\Inetpub\wwwroot, chọn OK

http://www.msopenlab.com/lab/iis/h11.jpg

- Mở Windows Explorer, vào C:\Inetpub\wwwroot kiểm tra database của Default Web Site gồm có 2 file iisstart.htmwelcome.png

http://www.msopenlab.com/lab/iis/h12.jpg

- Mở Internet Explorer, truy cập vào địa chỉ http://www.nhatnghe.com è Kiểm tra truy cập thành công trang web của Default Web Site

http://www.msopenlab.com/lab/iis/h13.jpg

3. Hosting Web Site trên IIS 7.0
Bước 1:
- Tạo thư mục C:\WebSite Nhatnghe
- Trong C:\WebSite Nhatnghe tạo file index.htm với nội dung bất kỳ

http://www.msopenlab.com/lab/iis/h14.jpg

Bước 2:
- Mở Internet Information Service (IIS) Manager từ Administrative Tools
- Bung Web server right click Site chọn Add Web Site…

http://www.msopenlab.com/lab/iis/h15.jpg

- Trong hộp thoại Add Web Site nhập WebNhatnghe vào ô Site name trong ô Physical Path trỏ đường dẫn đến C:\Web Site Nhatnghe trong ô Type chọn http trong ô Host name nhập www.nhatnghe.com, chon OK

http://www.msopenlab.com/lab/iis/h16.jpg

- Trong cửa sổ Internet Information Service (IIS) Manager, chọn WebNhatNghe, trong cửa sỗ giữa double click Default Document

http://www.msopenlab.com/lab/iis/h17.jpg

- Chọn file index.htm chọn Move Up để đưa file index.htm lên đứng đầu danh sách

http://www.msopenlab.com/lab/iis/h18.jpg

- Right click WebNhatnghe, vào Manage Web Site, chọn Restart

http://www.msopenlab.com/lab/iis/h19.jpg

Bước 3: Kiểm tra
- Mở Internet Exprorer, truy cập vào địa chỉ http://www.nhatnghe.com , kiểm tra truy cập thành công.

http://www.msopenlab.com/lab/iis/h20.jpg

4. Cấu hình Virtual Directory
Bước 1:
- Vào C:\Web Site Nhatnghe tạo thư mục tên Admin
- Vào thư mục Admin tạo file index.htm có nội dung tùy ý

http://www.msopenlab.com/lab/iis/h21.jpg

Bước 2:
- Mở Internet Information Service (IIS) Manager từ Administrative Tools
- Bung Web server bung Site, right click WebNhatnghe chọn Add Virtual Directory

http://www.msopenlab.com/lab/iis/h22.jpg

- Trong hộp thoại Add Virtual Directory, nhập admin vào ô Alias. Trong ô Physical path trỏ đường dẫn đến C:\Web Site Nhatnghe\Admin, chọn OK

http://www.msopenlab.com/lab/iis/h23.jpg

- Kiểm tra trong WebNhatnghe đã có Virtual Directory tên admin

http://www.msopenlab.com/lab/iis/h24.jpg

Bước 3
: Kiểm tra
- Mở Internet Explorer, truy cập vào địa chỉ http://www.nhatnghe.com/admin . Kiểm tra truy cập thành công

http://www.msopenlab.com/lab/iis/h25.jpg

5. Hosting nhiều Web Site trên 1 Web Server
Bước 1:

- Mở DNS Manager từ Administrative Tools
- Tạo Forward Lookup Zones tên abc.com, trong zone abc.com tạo host record www.abc.com chỉ tới địa chỉ web server (vd: 192.168.10.12)

http://www.msopenlab.com/lab/iis/h26.jpg

Bước 2:
- Tạo thư mục C:\Web Site ABC
- Trong thư mục C:\Web Site ABC tạo file default.htm có nội dung bất kỳ

http://www.msopenlab.com/lab/iis/h27.jpg

Bước 3:
- Mở Internet Information Services (IIS) Manager từ Administrative Tools
- Bung Web server, right click Site chọn Add Web Site

http://www.msopenlab.com/lab/iis/h28.jpg

- Trong hộp thoại Add Web Site nhập WebABC vào ô Site name. Trong ô Physical Path trỏ đường dẫn đến C:\Web Site ABC. Trong ô Type chọn http. Trong ô Host name nhập www.abc.com, chọn OK

http://www.msopenlab.com/lab/iis/h29.jpg

- Right click WebABC chọn Manage Web Site, chọn Restart

http://www.msopenlab.com/lab/iis/h30.jpg
Buớc 4: Kiểm tra

- Mở Internet Explorer, truy cập địa chỉ http://www.abc.com kiểm tra truy cập thành công

http://www.msopenlab.com/lab/iis/h31.jpg
- Mở Internet Explorer, truy cập địa chỉ http://www.nhatnghe.com kiểm tra truy cập thành công

http://www.msopenlab.com/lab/iis/h32.jpg

6. Cấu hình Secure Socket Layer (SSL) cho Web Site
Bước 1: Cài Active Directory Certificate Services role
- Mở Server Manager từ Administrative tools
- Right click Roles chọn Add Roles

http://www.msopenlab.com/lab/iis/h33.jpg

- Trong cửa sổ Select Server Roles, đánh dấu chọn Active Directory Certificate Service, chọn Next

http://www.msopenlab.com/lab/iis/h34.jpg

- Trong cửa sổ Introduction to Active Directory Certificate Services chọn Next

http://www.msopenlab.com/lab/iis/h35.jpg
- Trong cửa sổ Seclect Role Services, đánh dấu chọn Certification Authority Web Enrollment

http://www.msopenlab.com/lab/iis/h36.jpg
- Trong hộp thoại Add Roles Wizard, chọn Required Role Services

http://www.msopenlab.com/lab/iis/h37.jpg

- Trong cửa sổ Seclect Role Services, đánh dấu chọn Online Responder, chọn Next

http://www.msopenlab.com/lab/iis/h38.jpg
- Trong cửa sổ Specify CA Type, chọn Root CA, chọn Next

http://www.msopenlab.com/lab/iis/h39.jpg
- Trong cửa sổ Set Up Private Key, chọn Create a new private key, chọn Next

http://www.msopenlab.com/lab/iis/h40.jpg
- Trong cửa sổ Configure Cryptography for CA, giữ cấu hình mặc định, chọn Next

http://www.msopenlab.com/lab/iis/h41.jpg
- Trong cửa sổ Configure CA Name, nhập nhatngheCA vào ô Common name for this CA, chọn Next

http://www.msopenlab.com/lab/iis/h42.jpg

- Trong cửa sổ Set Validity Period, giữ cấu hình mặc định, chọn Next

http://www.msopenlab.com/lab/iis/h43.jpg

- Trong cửa sổ Configure Certificate Database, giữ cấu hình mặc định, chọn Next

http://www.msopenlab.com/lab/iis/h44.jpg
- Trong cửa sổ Web Server (IIS), chọn Next

http://www.msopenlab.com/lab/iis/h45.jpg

- Trong cửa sổ Select Role Services, giữ cấu hình mặc định, chọn Next

http://www.msopenlab.com/lab/iis/h46.jpg

- Trong cửa sổ Confirm Installation Selections, chọn Install

http://www.msopenlab.com/lab/iis/h47.jpg

- Trong cửa sổ Installation Results, kiểm tra quá trình cài đặt thành công, chọn Close

http://www.msopenlab.com/lab/iis/h48.jpg

Bước 2: Xin SSL certificate cho Web Server
- Mở Internet Information Services (IIS) Manage từ Administrative Tools
- Chọn Web server, trong cửa sổ giữa double click Server Certificates

http://www.msopenlab.com/lab/iis/h49.jpg

- Trong phần Action, chọn Create Certificate Request…

http://www.msopenlab.com/lab/iis/h50.jpg

- Trong cửa sổ Distinguished Name Properties, nhập thông tin:
Common name: www.nhatnghe.com
Organization: Nhatnghe
Organizational unit: Trainning
City/locality: HCM
State/Province: HCM
Contry/region: VN
chọn Next

http://www.msopenlab.com/lab/iis/h51.jpg

- Trong cửa sổ Cryptographic Service Provider Properties, giữ cấu hình mặc định, chọn Next

http://www.msopenlab.com/lab/iis/h52.jpg

- Trong cửa sổ File Name nhập đường dẫn C:\nhatnghe.txt vào ô Specify a file name for the certificate request, chọn Finish

http://www.msopenlab.com/lab/iis/h53.jpg

- Mở Window Explorer, vào C: , double click mở file nhatnghe.txt
- Copy tất cả nội dung của file nhatnghe.txt

http://www.msopenlab.com/lab/iis/h54.jpg

- Mở Internet Explorer truy cập vào địa chỉ http://tênmáyCAserver/certsrv (vd: http://websvr.nhatnghe.com/certsrv )
- Trong cửa sổ Welcome, chọn Request a certificate

http://www.msopenlab.com/lab/iis/h55.jpg

- Trong cửa sổ Request s Certificate, chọn advanced certificater request

http://www.msopenlab.com/lab/iis/h56.jpg

- Trong cửa sổ Advanced Certificate Request, chọn Submit a certificate requestby using a base-64-encoded CMC or PKCS #10 file, or submit a renewal request by usinga base-64-encoded PKCS #7 file

http://www.msopenlab.com/lab/iis/h57.jpg

- Trong cửa sổ Submit a Certificate Request or Renewal Request, gián nội dung của file nhatnghe.txt vào ô Saved Request, chọn Submit.
- Tại cửa sổ Cetificate Pending, kiểm tra thông báo, tắt Internet Explorer

http://www.msopenlab.com/lab/iis/h58.jpg

- Mở Certification Authority từ Administrative Tools, bung nhatngheCA, vào Pending Requests, right click certificate 2 chọn All Tasks, chọn Issue

http://www.msopenlab.com/lab/iis/h59.jpg

- Mở Internet Explorer truy cập vào địa chỉ http://tên máy CA server/certsrv (vd: http://websvr.nhatnghe.com/certsrv )
- Trong cửa sổ Welcome, chọn View the status of a pending certificate request

http://www.msopenlab.com/lab/iis/h60.jpg

- Trong cửa sổ View the Status of a Pending Certificate Request, chọn Save-Request Certificate (…….)

http://www.msopenlab.com/lab/iis/h61.jpg

- Trong cửa sổ Cetificate Issed, chọn Download certificate

http://www.msopenlab.com/lab/iis/h62.jpg

- Trong hộp thoại File download- Security Warning, chọn Save, lưu file certnew.cer vào C: , sau khi download thành công, chọn Close, tắt cửa sổ Internet Explorer

http://www.msopenlab.com/lab/iis/h63.jpg

- Mở Internet Information Services (IIS) Manager, chọn Web server. Trong cửa sổ giữa, double click Server Certificates

http://www.msopenlab.com/lab/iis/h64.jpg

- Trong phần Action, chọn Complete Certificate Request…

http://www.msopenlab.com/lab/iis/h65.jpg

- Trong cửa sổ Specify Certificate Authority Response, chọn chỉ đường dẫn đến C:\certnew.cer. Nhập Web Nhatnghe vào ô Friendly name, chọn OK

http://www.msopenlab.com/lab/iis/h66.jpg

- Kiểm tra trong phần Server Certificate đã có certificate Web Nhatnghe

http://www.msopenlab.com/lab/iis/h67.jpg

- Trong cửa sổ Internet Information Services (IIS) Manager, bung Site, Right click WebNhatNghe, chọn Edit Binding

http://www.msopenlab.com/lab/iis/h68.jpg

- Trong hộp thoại Site Bindings, chọn Add

http://www.msopenlab.com/lab/iis/h69.jpg

- Hộp thoại Add Site Binding, trong ô Type chọn https, trong ô SSL certificate chọn Web Nhatnghe, chọn OK

http://www.msopenlab.com/lab/iis/h70.jpg

- Trong hộp thoại Site Bindings, chọn Close

http://www.msopenlab.com/lab/iis/h71.jpg

- Trong cửa sổ Internet Information Services (IIS) Manager, right click WebNhatnghe, chọn Manage Web Site, chọn Restart

http://www.msopenlab.com/lab/iis/h72.jpg

Bước 3:
Kiểm tra

- Mở Internet Exporer, truy cập vào địa chỉ https://www.nhatnghe.com , kiểm tra truy cập thành công.

http://www.msopenlab.com/lab/iis/h73.jpg


Bây giờ là 03:44 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.