Have you ever wondered “What is a Web Server”? Do you know the mechanisms that delivered this page to you? From where the browser bring a webpage onto your screen? Chances are you are sitting at a computer right now, viewing this page in a browser. So, when you clicked on the link for this page or typed in its URL (uniform resource locator), what happened behind the scenes to bring this page onto your screen? The webpages are collected from web servers. So, what is a Web Server?
What is a Web Server?
In network terminology, a server is a computer that serves many kinds of information to a user or client machine. A server that is used to host websites is called a web server.
The term web server can mean one of the two things:
- A computer responsible for serving web pages, mostly HTML documents, via the HTTP protocol to clients. A web server connects to the Internet and supports physical data interchange with other devices connected to the web.
- On the software side, a web server includes several parts that control how web users access hosted files. At a minimum, this is an HTTP server. An HTTP server is software that understands URLs (web addresses) and HTTP (the protocol your browser uses to view webpages). An HTTP server can be accessed through the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user’s device.
How does Web Server work?
At the most basic level, whenever a browser needs a file that is hosted on a web server, the browser requests the file via HTTP. When the request reaches the correct (hardware) web server, the (software) HTTP server accepts the request, finds the requested document, and sends it back to the browser, also through HTTP. (If the server doesn’t find the requested document, it returns a 404 response instead). After receiving the web page, the browser reads the HTML tags and formats the page accordingly, and displays on the computer screen. (List of codes with responses.)
The browser read the HTML tags and formatted the page onto your screen.
Types of Web Servers
In market there are different types of web servers available. Let’s discuss about the most popular web servers – Apache, IIS, Nginx and LiteSpeed.
- Apache: One of the most popular web server in the world developed by the Apache Software Foundation. Apache is an open source software which supports almost all operating systems including Linux, Unix, Windows, FreeBSD, Mac OS X and more. About 60% of machines run on Apache Web Server. Customization of apache web server is easy as it contains a modular structure. It is also an open source which means that you can add your own modules to the server when to require and make modifications that suit your requirements. It is more stable than any other web servers and is easier to solve administrative issues. It can be install on multiple platforms successfully.
- IIS: IIS is a Microsoft product. This server has all the features just like apache. But it is not an open source and more over adding personal modules is not easy and modification becomes a little difficult job. Microsoft developed this product and they maintains, thus it works with all the windows operating system platforms. Also, they provides good customer support if it had any issues.
- Nginx: Another free open source web server is Nginx, it includes IMAP/POP3 proxy server. Nginx is known for its high performance, stability, simple configuration and low resource usage. This web server doesn’t use threads to handle requests rather a much more scalable event-driven architecture which uses small and predictable amounts of memory under load. It is getting popular in the recent times and it is hosting about 7.5% of all domains worldwide. Most of the web hosting companies are using this in recent times.
- LightSpeed: LiteSpeed (LSWS) is a high-performance Apache drop-in replacement. LSWS is the 4th most popular web server on the internet and it is a commercial web server. This is compatible with most common apache features, including mod_rewrite, .htaccess, and mod_security. LSWS can load apache configuration files directly and works as a drop-in replacement apache with most of the hosting control panels. It replaces apache in less than 15 minutes with zero downtime. Unlike other front-end proxy solutions, LSWS replaces all Apache functions, simplifying use and making the transition from Apache smooth and easy. Most of the hosting companies were using LSWS in recent times.
A web server can host one, or many websites.
The basic objective of the web server is to store, process, and deliver web pages to the users. This intercommunication is done using Hypertext Transfer Protocol (HTTP).
Apart from HTTP, a web server also supports SMTP(Simple Mail Transfer Protocol) and FTP(File Transfer Protocol) for emailing and file transfer and storage.
SMTP (Simple Mail Transfer Protocol)
An SMTP (Simple Mail Transfer Protocol) server is an application that’s primary purpose is to send, receive, and/or relay outgoing mail between email senders and receivers.
An SMTP server will have an address (or addresses) that can be set by the mail client or application that you are using, and is generally formatted as smtp.serveraddress.com. (For example, Gmail’s SMTP server address is smtp.gmail.com. You can generally find your SMTP server address in the account or settings section of your mail client.)
When you send an email, the SMTP server processes your email, decides which server to send the message to, and relays the message to that server. The recipient’s inbox service provider, such as Gmail or AOL then downloads the message and places it in the recipient’s inbox.
FTP (File Transfer Protocol)
FTP stands for “File Transfer Protocol.” It’s also one of the oldest protocols in use today and is a convenient way to move files around. An FTP server offers access to a directory, with sub-directories. Users connect to these servers with an FTP client, a piece of software that lets you download files from the server, as well as upload files to it.