So what is web server
A web server is a server that installs programs that serve web applications. The webserver is capable of receiving requests from web browsers and sending responses to the client via HTTP or other protocols. There are many different web servers such as: Apache, Nginx, IIS, … The most common Web server today:
How does the web server work?
Whenever you view a website on the internet, it means that you are requesting that page from a web server. When you enter the URL in your browser (e.g. https://designthing.net) it will take the following steps to send you response.
1. Browsers resolve domain names into IP addresses
Your web browser first needs to determine which IP address the domain designthing.net points to. The browser will ask for information from one or more DNS servers (via the internet). The DNS server tells the browser which IP address the domain will point to as well as where the site is located.
Now that the web browser knows the IP address of the website, it can request the full URL from the webserver.
2. Web Server responses the client the requested page
The web server responds by returning the requested client information … If the page does not exist or another error occurs, it will send the appropriate error message.
3. The browser renders the web page
Your web browser receives html files (many other files) … and renders the page as required.
The most popular web server software
Apache HTTP server – web server apache
Apache is the most widely used web server in the world. Apache is developed and maintained by an open source community under the umbrella of the Apache Software Foundation. Apache is released with an Apache License that is free to use.
As of August 2018, apache is estimated to serve 54.2% of active websites and 53.3% of top servers. Apache runs on operating systems such as windows, linux, unix, MacOS ….
Apache is used for php web server the most run best in linux
Nginx web server – another linux web server
Nginx is a lightweight web server that doesn’t take up a lot of system resources. Nginx is also an open source proxy reserse. Nginx is quite stable, simple configuration and high performance.
Nginx was developed by Igor Sesoev in 2002 mainly to serve the rambler.ru website (Russia’s second most visited website). According to Netcaft, out of the world’s largest one million websites, 6.52% use Nginx.
Nginx is free and open source software, widely released under the BSD license. Nginx is developed in a language and runs on operating systems such as Linux, FreeBSD, Windows, MacOS …
Nginx has features such as user authentication, virtual hosting, support for CGI, FCGI, SCGI, WCGI, SSI, ISAPI, HTTPS, Ipv6, etc.
Web server IIS – web server for windows
IIS developed by Microsoft, this product is integrated with Windows Server operating system. In IIS, there are many services such as: Web Server service, FTP Server service. As of May 2015, the number of Web pages using IIS servers is nearly 248 million.
All web server features are managed independently so we can easily add, remove or replace web server features.
Thanks to integrated ASP.NET IIS can use the full power of ASP.NET. The ASP.NET module makes server development fast thanks to the familiar interface and ASP.NET application services.
Apache tomcat server – web server java
Apache Tomcat is a Java Servlet developed by the Apache Software Foundation. Tomcat implements Java Servlet and JavaServer Pages (JSP) applications. Tomcat provides an HTTP server for pure Java language.
Apache Tomcat is very stable and has all the features of a commercial web application but comes with Apache’s open source license. Tomcat also provides some additional functions like tomcat manager application, speciallized realm imlementation and tomcat valves.
The version of apache tomcat coincides with the version and specification of java servlet or java servlet API. Tomcat 5.5X supports Servlet API 2.3, tomcat 6.0X supports servlet API 2.4 and tomcat 7.0 supports servlet API 3.0. In addition to the Servlet versions API, the tomcat version supports the corresponding JSP API version.
Apache Tomcat supports operating systems such as windows, linux, MacOS, BSD, …
Lighttpd web server
Lighttpd is an open source, secure and flexible, especially free and distributed under the BSD license. Lighttpd is written by Jan Kneschke. Lighttpd takes up less resources, low memory, small CPU. Lighttpd is developed in C. It runs on Linux, Windows, Mac OS, …