What is a web server?

Source: Internet
Author: User
Tags hosting server hosting

A server on the internet, also known as a Web server, is a computer with an independent IP address on the Internet. It can provide Internet services such as WWW, email, and FTP to clients on the Internet. A Web Server is a program that resides on a certain type of computer on the Internet. When a web browser (client) connects to the server and requests a file, the server processes the request and sends the file to the browser, the attached information tells the browser how to view the file (that is, the file type ). Servers use HTTP (Hypertext Transfer Protocol) for information exchange, which is often referred to as HTTPd servers. Web servers not only store information, but also run scripts and programs based on the information provided by users through web browsers. For example, if you want to provide free company information, you only need to create a free Request Form, which requires your readers to enter the mail and company information. After filling out the form, the reader clicks the submit button, this form will be sent to a program on the server computer, which is responsible for processing the request and sending a free message to the reader via e-mail. You can also send the information provided by the customer to a database. Programs or scripts used to execute these functions are called Gateway scripts/programs, or CGI (General Gateway Interface) scripts. On the web, most forms and search engines you see use this technology.

Web servers can reside on various types of computers, from common PCs to giant UNIX networks, and various other types of computers. They are usually connected to the Internet through a high-speed line. If it doesn't matter for performance, you can also use low-speed connections (or even a modem), but for an electronic store, performance is definitely an issue to consider.
1)Virtual Host
Virtual Hosts use special hardware and software technologies to divide a Computer Host into a "virtual" host. Each virtual host has an independent domain name and IP address (or shared IP address ), provides complete Internet server functions. Virtual Hosts are completely independent. in the outside world, each virtual host is exactly the same as an independent host, you can use it to create your own WWW, FTP, and e-mail servers.
The emergence of VM technology is a major contribution to Internet technology and a good news for Internet users. Because multiple virtual hosts share the resources of a real host, the hardware cost, network maintenance cost, and communication line cost for each user are greatly reduced, making the Internet a truly affordable network for everyone. Almost all American companies (including some families) now have their own web servers on the Internet.
The server hardware of the VM service provider has a relatively high performance, and the communication lines are relatively smooth, which can achieve a very high data transmission speed (up to 45 Mb/s ), it provides a good external environment for users. users do not have to be responsible for the maintenance of machine hardware, software settings, network monitoring, file backup, and other work. Therefore, you do not need to worry about and spend money on these jobs.
2)Server hosting
Server hosting is where ISP racks are rented to establish an enterprise web service system. The Enterprise host is placed in the ISP data center, and the ISP allocates IP addresses to provide necessary maintenance work. The enterprise performs internal system maintenance and data updates on the host. This method is especially suitable for organizations that need to transmit large amounts of data over the Internet and publish large amounts of information.

Configure a web site

The IIS maintenance tool is the "Internet Information Service" Management Program. By opening the "management tool" in the "control panel", you can run the "Internet Information Service" shortcut ", you can open the "Internet Information Service" management program window. In the left pane of the window, click node "(Local Computer)"> "website"> "default website" to view the file structure of the local default web site. You can configure the Local Web site here.

1. Set the Home Directory

Each web site must have a home directory. The main directory is the central location of the Publishing Page, Which is mapped to the domain name or service name of the site. For example, if the site's Internet domain name is www.microsoft.com and the home directory is C: \ website \ microsoft, then the browser uses a http://www.microsoft.com to access files in the home directory.

The default main directory is created when IIS is installed. You can change it as follows.

(1) In the "Internet Information Service" Management Program, right-click "default website" and select the "properties" menu command to open its property page.

(2) Click the "home directory" tab and specify the physical path of the home directory in the "local path" text box.

For example, if you use the FrontPage website template "Personal Homepage" to create a website under the Directory D: \ myweb, in the "Internet Information Service" Management Program, set the Home Directory of "default website" to D: \ myweb. Open IE and enter the address http: // localhost to view the website you just created.

2. Create a virtual directory

To publish pages from other directories in the home directory, you must create a virtual directory. The virtual directory is not included in the main directory, but it can be displayed in the client browser, as if it is in the main directory.

To create a virtual directory, follow these steps:

(1) In the "Internet Information Service" Management Program, select the web site or directory to which you want to add a directory;

(2) Select the "new" command in the "operation" menu and select "virtual directory ";

(3) Complete the settings according to the "virtual directory creation wizard" prompt.

For example, use the FrontPage website template "company display wizard" to create a website under the directory e: \ company, and use the "Internet Information Service" management program, create a virtual directory company under the "default website" directory and map the directory to the physical directory e: \ company. In this way, open IE and enter the address http: // localhost/Company/to browse the website you just created.

3. Set the default document

The default document is the document that the server will provide to visitors when a visitor does not specify a file name in his/her URL request. For example, you can click http://www.microsoft.com/in the address bar of your browser to access the micosoftmain page. This is because the Web server uses the default document (Micosoft homepage) to respond to all requests without a file name. In addition, the processing of URLs containing subdirectories is the same.

The most common document names are default.htmand index.htm, or other file extensions.

To set the default document, follow these steps.

(1) In the "Internet Information Service" Management Program, right-click "default website" or its directory name, and select the "properties" menu command, you can open its property page.

(2) Click the "document" tab, select "enable default Document", and specify the default document name.

For example, create an empty directory e: \ test, copy the file sow.01.htm to this directory, and create a virtual directory test under the "default website" Directory through the "Internet Information Service" management program, map the directory to the physical directory e: \ test. Open the IE browser and enter the address http: // localhost/test/. The content cannot be viewed. After passing through the “internet”"", set the tutorial file of the virtual directory testto sow.01.htm only. In the IE browser, enter the http: // localhost/test/address to view the content of sow.01.htm.

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.