WEBSERVER LÀ GÌ

Prerequisites: Objective:
You should already know how the Internet works, và understand the difference between a web page, a website site, a website hệ thống, & a search engine.

Bạn đang xem: Webserver là gì

You will learn what a website VPS is và gain a general understanding of how it works.

The term web server can refer to hardware or software, or both of them working together.

On the hardware side, a web server is a computer that stores web VPS software & a website"s component files. (for example, HTML documents, images, CSS stylesheets, and JavaScript files) A website hệ thống connects to lớn the Internet and supports physical data interchange with other devices connected khổng lồ the web.

At the most basic cấp độ, whenever a browser needs a file that is hosted on a web hệ thống, the browser requests the tệp tin via HTTP.. When the request reaches the correct (hardware) web server, the (software) HTTP server accepts the request, finds the requested document, và sends it baông xã to the browser, also through HTTP. (If the hệ thống doesn"t find the requested document, it returns a 404 response instead.)

*

To publish a trang web, you need either a static or a dynamic web hệ thống.

A static website server, or stack, consists of a computer (hardware) with an HTTP. server (software). We call it "static" because the hệ thống sends its hosted files as-is to lớn your browser.

A dynamic web server consists of a static website server plus extra software, most commonly an application server và a database. We Điện thoại tư vấn it "dynamic" because the application server updates the hosted files before sending content to your browser via the HTTPhường VPS.

For example, khổng lồ produce the final webpages you see in the browser, the application hệ thống might fill an HTML template with nội dung from a database. Sites lượt thích MDoanh Nghiệp or Wikipedia have thousands of webpages. Typically, these kinds of sites are composed of only a few HTML templates and a giant database, rather than thousands of static HTML documents. This thiết đặt makes it easier khổng lồ maintain và deliver the content.


Deeper dive


To review: lớn fetch a webpage, your browser sends a request to the website server, which searches for the requested file in its own storage space. Upon finding the tệp tin, the hệ thống reads it, processes it as-needed, và sends it khổng lồ the browser. Let"s look at those steps in more detail.


Hosting files


First, a website hệ thống has to lớn store the website"s files, namely all HTML documents and their related assets, including images, CSS stylesheets, JavaScript files, fonts, & Clip.

Technically, you could host all those files on your own computer, but it"s far more convenient to lớn store files all on a dedicated web server because:

A dedicated web VPS is typically more available. (up & running) Excluding downtime & systems troubles, a dedicated web hệ thống is always connected khổng lồ the Internet. A dedicated web VPS is typically maintained by a third-buổi tiệc ngọt.

Xem thêm: Tiểu Sử Nghệ Sỹ Mai Phương Thảo, Nhạc Mai Phương Thảo

For all these reasons, finding a good hosting provider is a key part of building your website. Examine the various services companies offer. Choose one that fits your needs và budget. (Services range from không tính tiền to lớn thousands of dollars per month.) You can find more details in this article.

Once you have sầu web hosting service, you must upload your files lớn your website VPS.


Communicating through HTTP


Second, a web VPS provides support for HTTPhường (Hypertext Transfer Protocol). As its name implies, HTTPhường specifies how khổng lồ transfer hypertext (linked website documents) between two computers.

A Protocol is a phối of rules for communication between two computers. HTTP. is a textual, stateless protocol.

Textual All commands are plain-text and human-readable. Stateless Neither the hệ thống nor the client remember previous communications. For example, relying on HTTPhường alone, a hệ thống can"t remember a password you typed or rethành viên your progress on an incomplete transaction. You need an application server for tasks like that. (We"ll cover that sort of giải pháp công nghệ in other articles.)

HTTP provides clear rules for how a client và hệ thống communicate. We"ll cover HTTP itself in a technical article later. For now, just be aware of these things:

Usually only clients make HTTP requests, and only to lớn servers. Servers respond khổng lồ a client"s HTTP request. A hệ thống can also populate data inlớn a client cabịt, in advance of it being requested, through a mechanism called a VPS push. The web server must answer every HTTPhường request, at least with an error message.

On a website hệ thống, the HTTPhường server is responsible for processing và answering incoming requests.

Upon receiving a request, an HTTPhường hệ thống first checks if the requested URL matches an existing file. If so, the web hệ thống sends the file content back to lớn the browser. If not, an application server builds the necessary tệp tin.

Static vs. dynamic content


Roughly speaking, a hệ thống can serve sầu either static or dynamic nội dung. Rethành viên that the term static means "served as-is". Static websites are the easiest to lớn mix up, so we suggest you make your first site a static site.

The term dynamic means that the hệ thống processes the content or even generates it on the fly from a database. This approach provides more flexibility, but the technical staông chồng is more complex, making it dramatically more challenging to build a trang web.

There are so many application VPS technologies that it"s difficult khổng lồ suggest a particular one. Some application servers cater to specific website categories like blogs, wikis, or eCommerce; others are more generic. If you"re building a dynamic trang web, take the time to lớn choose technology that fits your needs. Unless you want to learn website VPS programming (which is an exciting area in itself!), you don"t need to lớn create your own application hệ thống. That"s just reinventing the wheel.


Next steps


Now that you are familiar with web servers, you could:


Found a problem with this page?


Last modified: Sep 4, 2021, by MDoanh Nghiệp contributors

Change your languageSelect your preferred language English (US)EspañolFrançais日本語한국어Português (doBrasil)Русский中文 (简体)正體中文 (繁體) Change language