|You should already know how the Internet works, and underst& the difference between a website page, a website site, a web hệ thống, & a tìm kiếm engine. |
Bạn đang xem: Webserver Là Gì ? Hiểu Rõ Về Web Server Web Server Là Gì
|You will learn what a website VPS is and gain a general understanding of how it works.|
At the most basic cấp độ, whenever a browser needs a tệp tin that is hosted on a website hệ thống, the browser requests the tệp tin via HTTP.. When the request reaches the correct (hardware) website server, the (software) HTTP.. server accepts the request, finds the requested document, và sends it baông chồng lớn the browser, also through HTTPhường. (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 server.
A static web server, or staông chồng, consists of a computer (hardware) with an HTTPhường VPS (software). We Gọi it "static" because the VPS sends its hosted files as-is khổng lồ your browser.
A dynamic web server consists of a static web server plus extra software, most commonly an application server and a database. We Gọi it "dynamic" because the application hệ thống updates the hosted files before sending content to lớn your browser via the HTTP hệ thống.
For example, lớn 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 MDN or Wikipedia have thousands of webpages. Typically, these kinds of sites are composed of only a few HTML templates và a giant database, rather than thousands of static HTML documents. This cài đặt makes it easier to maintain & deliver the content.
There is no active learning available yet. Please, consider contributing.
To review: to fetch a webpage, your browser sends a request to the web 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, and sends it khổng lồ the browser. Let"s look at those steps in more detail.
Technically, you could host all those files on your own computer, but it"s far more convenient lớn store files all on a dedicated website VPS because:A dedicated web server is typically more available. (up and running) Excluding downtime và systems troubles, a dedicated web hệ thống is always connected to the Internet. A dedicated web VPS is typically maintained by a third-buổi tiệc ngọt.
For all these reasons, finding a good hosting provider is a key part of building your trang web. Examine the various services companies offer. Choose one that fits your needs và budget. (Services range from không tính phí khổng lồ thousands of dollars per month.) You can find more details in this article.
Once you have website hosting service, you must upload your files to lớn your web server.
Communicating through HTTP
Second, a web VPS provides support for HTTP.. (Hypertext Transfer Protocol). As its name implies, HTTP specifies how lớn transfer hypertext (linked website documents) between two computers.
A Protocol is a set of rules for communication between two computers. HTTPhường. is a textual, stateless protocol.Textual All commands are plain-text and human-readable. Stateless Neither the server nor the client rethành viên previous communications. For example, relying on HTTP alone, a hệ thống can"t remember a password you typed or remember your progress on an incomplete transaction. You need an application VPS for tasks like that. (We"ll cover that sort of technology in other articles.)
HTTP provides clear rules for how a client & server communicate. We"ll cover HTTP. itself in a technical article later. For now, just be aware of these things:Only clients can make HTTP requests, và then only to lớn servers. Servers can only respond to a client"s HTTP.. request. The web server must answer every HTTP.. request, at least with an error message.
Static vs. dynamic content
Roughly speaking, a server can serve sầu either static or dynamic content. Remember that the term static means "served as-is". Static websites are the easiest lớn mix up, so we suggest you make your first site a static site.
The term dynamic means that the VPS 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 lớn build a website.
There are so many application server technologies that it"s difficult lớn suggest a particular one. Some application servers cater to specific website categories lượt thích blogs, wikis, or eCommerce; others are more generic. If you"re building a dynamic website, take the time lớn choose công nghệ that fits your needs. Unless you want to learn web server programming (which is an exciting area in itself!), you don"t need lớn create your own application server. That"s just reinventing the wheel.
Now that you are familiar with web servers, you could:
Found a problem with this page?
Last modified: May 4, 2021, by MDN contributorsChange your languageSelect your preferred language English (US)EspañolFrançais日本語한국어Português (doBrasil)Русский中文 (简体)正體中文 (繁體) Change language