Web Server Configuration methods

Source: Internet
Author: User
Tags file transfer protocol

Web Server Overview

The Web server, also known as the WWW server, is the server that places the general Web site. A Web server can build multiple sites, the owners of each site only need to put the good web pages and related files in the Web server site, other users can use a browser to access the Web pages in the site.

We configure the Web server, is to establish a Web site on the server, and set up the relevant parameters, as for the Web site should be made by the maintenance of the site and uploaded to the server, this work is not part of the configuration server work.

Installation of IIS

IIS is generally not installed by default when you install the operating system, so you will need to install IIS the first time you configure the Web server. The installation method is:

1. Open the Control Panel, open Add/Remove Programs, and pop up the Add/Remove Programs window.

2. Click the Add/Remove Windows Components icon in the window to bring up the Windows Component Wizard dialog box.

Figure 1

3. Select the Application Server check box in the wizard. Click the Details button to bring up the Application Server dialog box.

Figure 2

4. Select the required components, where Internet Information Services (IIS) and application server consoles must be selected. When Internet Information Services (IIS) is selected, and then click the Details button, the Internet Information Services (IIS) dialog box pops up.

Figure 3

5. Select Internet Information Services Manager and World Wide Web services. After you select World Wide Web service, and then click the Details button, the World Wide Web Service dialog box pops up.

Figure 4

6. The "World Wide Web Service" must be selected. If you want the server to support ASP, you should also select Active server Pages. Click the OK button one by one to close each dialog box until you return to the Windows Component Wizard dialog box in Figure 1.

7. Click the "Next" button to start the installation of IIS, which may require a Windows Server 2003 installation disk to be inserted, and the system will automatically install the work.

8. After the installation is complete, you will be prompted to install the successful dialog box, click the "OK" button to complete the installation of IIS.

Tip: If you want to mount an FTP server at the same time, select the File Transfer Protocol (FTP) service check box in the Internet Information Services (IIS) dialog box.

To create a Web site in IIS

Open Internet Information Services Manager, right-click on the site of the catalog tree, select new → Web site from the context menu, and the Site Creation Wizard pops up:

Figure 6

Figure 7

The site description is the name of the site, which is displayed in the directory Tree of the IIS window, allowing the administrator to identify each site. This example is named "Foliage site".

Figure 8

Web site IP Address: If you select "All Unassigned", the server binds all IP addresses on the site to this website, which is suitable for only this site in the server. You can also select an IP address from the drop-down list box (listed in the drop-down list box is the native configured IP address, if not, you should first configure the IP address for the computer, and then select.) )

TCP port: The default port number 80 is typically used, and if you change to a different value, the user must include the port number in the address when accessing the site.

Host Header: If the site already has a domain name, you can enter the domain name in the host header.

Figure 9

The home directory path is the location of the site root directory, and you can use the Browse button to select a folder as the home directory for the site.

Figure 10

Site access is limited to the user's access to the site, "read" is required, "Run Script" allows the site to support ASP, other permissions can be set as needed.

Click Next and the Complete wizard dialog box appears, completing the process of creating a new Web site that you can see in IIS. Copy the good web pages and related files to the home directory, and you will usually have access to the site.

Figure 11

To access the site, you can enter "http://localhost/" in the browser's address bar if you are accessing this computer, or you can enter "http://web site IP Address" in the address bar of your browser if you are accessing it from other computers on your network.

Note: If the TCP port of the Web site is not 80, the port number must be added to the address. Assuming that the TCP port is set to 8080, the access address should be written as "http://localhost:8080/" or "http: 8080".

Basic configuration of the website

If you need to modify the parameters of the site, you can open the Web Site Properties dialog box by right-clicking on the site name and selecting Properties from the context menu.

1, "website" label

Site ID: You can set the site name, IP address, port number. Click the Advanced button to set the host header names.

2. "Home Directory" tab

Figure 13

The path name and access permissions for the home directory can be set in the local path.

3. "Documents" tab

Figure 14

The default document is the default page that you want to open when you visit a Web site, which is usually the home page of the site. If the home page file name is not in the default document list for which the default document or Web site is enabled, you will need to indicate the file name in the address when you visit the site.

The default document list initially has only 4 file names: Default.htm, Default.asp, Index.htm, and Default.aspx. I added a index.asp with the Add button and moved it to the top with the Move Up button. This is mainly because my site's homepage is called "index.asp", so it should be added to the list, and it doesn't matter if it's at the top of the list.

With the above configuration, a Web site can be used. Copy the created page to the home directory of the site, and the file name of the home page should be included in the default document. Open the browser and enter "http://Native IP address" in the address bar to open the homepage of the website. Other pages can be opened with hyperlinks in the Web page.

Virtual directory

A virtual directory allows a site to not have to place everything in the home directory. The virtual directory is still within the home directory from the user's point of view, but the actual location can be anywhere else on the computer, and the virtual directory name can be different from the real directory. Such as:

Figure 15

The user sees a folder "Pic" in the home directory where the real location is at the server's "D:myimage", while the home directory is located at "C:mywww". Assuming that the site's domain name is "www.abc.com", when the user accesses "http://www.abc.com/pic/file 1", the actual location of the access is the server's "D:myimage file 1", so the real name and location of the virtual directory is not known to the user.

How to create a virtual directory:

Open the Internet Information Services window, right-click on the Web site where you want to create the virtual directory, and choose new → virtual directory. Pop-up Virtual Directory Creation Wizard:

Figure 16

The alias is the name after the mapping, that is, when the customer accesses the name;

Figure 17

Path: The true path name on the server, the actual location of the virtual directory;

Figure 18

Access rights: Refers to the customer's access to the directory.

Click "Next" button to pop up the completion dialog, the virtual directory is established successfully. By copying the relevant files to the virtual directory, users can access the specified files in a virtual tree structure.

Usually the virtual directory access rights, the default document, and so on inherit the autonomous directory, if you need to modify, you can click on the virtual directory in Internet Information Services Manager and select Properties, you can modify the virtual directory parameter settings.

Problems

1. How do I build multiple Web sites on a single Web server?

Right-click the Web site in IIS Manager, select New Web site, and then use the Site Creation Wizard to create a new Web site that can be created each time you run it.

The key to multi-site is how to distinguish the various sites, based on the IP address, TCP port number, host header, as long as there are any of the three parameters can be different.

① use IP addresses to differentiate between websites: first configure multiple IP addresses for the server, and then set an IP address for each site in the IP Address column of the site properties.

② uses the TCP port to differentiate the sites: At this point each site can use the same IP address, but the TCP port settings are different (should use the value between 1024~65535), so you can also distinguish between the sites. However, this method requires users to visit the site, the address must be added to the port number, it is not very convenient, generally do not use.

③ use host header to differentiate the website: The main head is a sign string that conforms to the DNS naming rules, generally use the domain name of the website as the host header. Setting the host header can be set by clicking the Advanced button in the Web Site tab of the site properties.

Figure 19

With this advanced setting, you can also configure multiple IP addresses for a Web site, or use a different TCP port.

2, after the completion of the site configuration, why not open?

The most common scenario is that the file name of the site's home page is not added to the default document list, and there are only 4 default documents for the site in IIS6: Default.htm, Default.asp, Index.htm and Default.aspx, if your site's home page name is not one of these 4, you should add it in. If you do not add, you should use the address with the file name to access this page.

3. Why can't my ASP page execute?

In IIS6, ASP files must be enabled for Active Server Pages to execute, and if Active Server Pages is not selected when IIS is installed, the server does not enable Active Server Pages by default. You cannot execute ASP files.

Enable Active Server Pages by opening Internet Information Services Manager, selecting Web Service extensions in it, and then enabling Active Server Pages inside.

Web Server Configuration methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.