{"id":5582,"date":"2019-07-20T07:00:39","date_gmt":"2019-07-20T07:00:39","guid":{"rendered":"https:\/\/blog.ssdnodes.com\/blog\/?p=2511"},"modified":"2025-07-16T15:07:27","modified_gmt":"2025-07-16T15:07:27","slug":"what-is-a-web-server","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/what-is-a-web-server\/","title":{"rendered":"What Is A Web Server?"},"content":{"rendered":"<div id=\"preview1\" class=\"g-b g-b--t1of2 split split-preview\">\n<div id=\"preview\" class=\"preview-html\">\n<p><b>If you\u2019re like most people, you\u2019ve probably don\u2019t spend much time thinking about where websites come from.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">After all, if you were born in the 90\u2019s or later, the web has always just <\/span><i><span style=\"font-weight: 400;\">been there<\/span><\/i><span style=\"font-weight: 400;\">. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">And even if you're older, you've probably accepted the internet as an essential part of your life by now.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Most people certainly don\u2019t think of a website as data...<\/span><\/p>\n<p><span style=\"font-weight: 400;\">...and they probably don\u2019t think of web servers, ever.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">But web servers are the reason that data ends up as perfectly-placed pixels on your iPhone. Without them, there wouldn\u2019t be any websites as we know them.<\/span><\/p>\n<p><b>So, in this article, we\u2019re going to talk about web servers.\u00a0<\/b><\/p>\n<p><i><span style=\"font-weight: 400;\">What is a web server? How do they work? And which ones are most popular?<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">And then we\u2019ll guide you to some resources you can use if you\u2019re looking to set up a web server for yourself on your VPS.<\/span><\/p>\n<h2><b>What is a web server?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">A web server is a computer running software that accepts and respond to <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/World_Wide_Web\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">World Wide Web<\/span><\/a><span style=\"font-weight: 400;\"> client requests. The computer (server) stores all the info needed for a website, and the software processes requests and sends the requested document to the website\u2019s visitors using Internet protocols.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Web servers use the <\/span><span style=\"font-weight: 400;\">HTTP<\/span><span style=\"font-weight: 400;\"> (Hypertext Transfer Protocol) protocol to serve files and web pages in response to a request from a user via an <\/span><span style=\"font-weight: 400;\">HTTP<\/span><span style=\"font-weight: 400;\"> client (usually a web browser like Google Chrome or Safari).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The web server typically runs all the time to serve a client\u2019s request in various outputs like <\/span><span style=\"font-weight: 400;\">HTML<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">XHTML<\/span><span style=\"font-weight: 400;\">, and <\/span><span style=\"font-weight: 400;\">XML<\/span><span style=\"font-weight: 400;\">, which are otherwise known as <\/span><b>web pages<\/b><span style=\"font-weight: 400;\">. Before serving web pages to the client, it needs to collect some other resources, like <\/span><span style=\"font-weight: 400;\">CSS<\/span><span style=\"font-weight: 400;\"> or <\/span><span style=\"font-weight: 400;\">JavaScript<\/span><span style=\"font-weight: 400;\">files, images and fonts.<\/span><\/p>\n<h2><b>How does a web server work?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Let\u2019s talk about how a web server works. But before we talk about how a web server works, we need to understand the term <\/span><b>URL<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h3><b>What is a URL?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">A URL (Uniform Resource Locator) is a unique address for a file that\u2019s stored on a web server.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The file may be an <\/span><span style=\"font-weight: 400;\">HTML<\/span><span style=\"font-weight: 400;\"> file, a <\/span><span style=\"font-weight: 400;\">CSS<\/span><span style=\"font-weight: 400;\"> file, an image file, or any other file related to a web page, and is referred to as a <\/span><b>resource<\/b><span style=\"font-weight: 400;\"> for a web server.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A URL has the following elements:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The protocol (<\/span><span style=\"font-weight: 400;\">http<\/span><span style=\"font-weight: 400;\">\/<\/span><span style=\"font-weight: 400;\">https<\/span><span style=\"font-weight: 400;\">) used to access a resource. <\/span><a href=\"https:\/\/www.ssdnodes.com\/blog\/install-lets-encrypt-on-ubuntu-certbot-apache-and-nginx\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">Want to know more about HTTPS?<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">An IP address or domain name to identify the web server.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">A port number on which the web server is running. The default port number is 80, and in that case, there\u2019s no need to include the port number in the URL.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The path where the resource (file) is located in the web server.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">When you type a URL into your web browser, the server listed in the URL responds with the requested page.\u00a0<\/span><\/p>\n<h3><b>What does the web server do?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">In the background, web browser breaks the URL in the three parts: the protocol, the IP address or domain name, and the resource path in the web server.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The web browser contacts the web server indicated in the URL using HTTP\/HTTPS protocol to request the web page.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The web server then finds the requested document and all the necessary files and sends them back to the web browser via HTTP. If the web server can\u2019t find the requested page or document, it returns a 404 status code instead.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And that\u2019s it\u2014 that\u2019s how a web server works to serve you \u201cthe internet.\u201d<\/span><\/p>\n<div class=\"cta-inline\"><\/div>\n<h2>Apache &amp; Nginx: The most popular web servers<\/h2>\n<p><span style=\"font-weight: 400;\">The 2 most popular web servers are open source software\u2014 which means that they are free to download, install and use to power your websites.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The most widely used web server is the <\/span><b>Apache Web Server<\/b><span style=\"font-weight: 400;\">, which powers about <\/span><a href=\"https:\/\/w3techs.com\/technologies\/overview\/web_server\/all\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">44% of all websites<\/span><\/a><span style=\"font-weight: 400;\">. Not far behind it, though, is <\/span><b>Nginx<\/b><span style=\"font-weight: 400;\"> (pronounced engine-X) which has made big gains in the past few years.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Each of these options are generally deployed in a software stack built on the Linux operating system\u2014 the LAMP stack (Adobe) or the LEMP stack (nginx).<\/span><\/p>\n<h2>Set up a web server on your VPS: LAMP vs LEMP<\/h2>\n<p><span style=\"font-weight: 400;\">Both of these software stacks are built on the Linux operating system and are comprised of the OS (Linux), a web server software, a database software, and a programming language.<\/span><\/p>\n<p><b>What is a LAMP stack?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A <\/span><b>LAMP<\/b><span style=\"font-weight: 400;\"> stack is a framework for developing a web application or dynamic websites using <\/span><b>L<\/b><span style=\"font-weight: 400;\">inux as the operating system, <\/span><b>A<\/b><span style=\"font-weight: 400;\">pache as the Web server, <\/span><b>M<\/b><span style=\"font-weight: 400;\">ySQL\/<\/span><b>M<\/b><span style=\"font-weight: 400;\">ariaDB as the database and <\/span><b>P<\/b><span style=\"font-weight: 400;\">HP as the scripting language.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">P<\/span><span style=\"font-weight: 400;\"> was traditionally meant to stand for PHP, but depending on requirements for a particular application, sometimes Perl or Python is substituted for PHP.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Each component of a LAMP stack is open source and freely available to anyone who wishes to use this stack to develop and deploy their web application or a dynamic website.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s walk through each component of a LAMP stack.<\/span><\/p>\n<h3><b>Linux<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Linux is a highly reliable and secure operating system preferred all over the world by universities, government organizations, small and large business organizations, and even for personal use.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There are a wide variety of Linux distributions available to choose from\u2014Red Hat, CentOS, Ubuntu, and Debian, to name a few.<\/span><\/p>\n<h3><b>Apache<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Apache is a free web server software distributed by the <\/span><a href=\"https:\/\/apache.org\/\" target=\"_blank\" rel=\"noopener\"><i><span style=\"font-weight: 400;\">Apache Software Foundation<\/span><\/i><\/a><span style=\"font-weight: 400;\"> and is widely used in all Linux distributions.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Apache is an HTTP server that is fast and secure. It's so popular because you can deploy Apache to everything from small static websites to large web applications with thousands or even millions of daily users.<\/span><\/p>\n<h3><b>MySQL\/MariaDB<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">MySQL is a free, relational database management system licensed under GNU GPL. It is not fully open source but instead released by Oracle under a dual GPL and commercial license.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you want a 100% open-source database management system, then choose <\/span><a href=\"https:\/\/mariadb.org\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">MariaDB<\/span><\/a><span style=\"font-weight: 400;\">, which was forked by some developers of MySQL due to concerns over its acquisition by Oracle Corporation. The MariaDB foundation distributes MariaDB and guarantees it will remain open source.<\/span><\/p>\n<h3><b>PHP\/Perl\/Python<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">PHP, Perl, and Python are <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Object-oriented_programming\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">object-oriented<\/span><\/a><span style=\"font-weight: 400;\">, server-side scripting languages. Any logic you put in these languages run inside the web server and the results can be embedded into an HTML page before sending it to the web browser.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">PHP is widely popular among developers due to its natural learning curve and availability of ready-made extensions\u2014many free and open source web development frameworks like Laravel, Symphony, Zend framework are written in PHP.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Plus, the most popular content management systems (CMS), like WordPress, Drupal, and Joomla are all based on PHP.<\/span><\/p>\n<h2><b>What is a LEMP stack?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">LEMP<\/span><span style=\"font-weight: 400;\"> stack is a variation on the <\/span><span style=\"font-weight: 400;\">LAMP<\/span><span style=\"font-weight: 400;\"> stack that is growing in popularity.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In a LEMP stack, you replace Apache with Nginx, which is represented by the letter E (to keep our acronyms nice and simple).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Nginx is an open source reverse proxy server for <\/span><span style=\"font-weight: 400;\">HTTP<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">HTTPS<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">SMTP<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">POP3<\/span><span style=\"font-weight: 400;\">, and <\/span><span style=\"font-weight: 400;\">IMAP<\/span><span style=\"font-weight: 400;\"> protocols, and it can also act as a load balancer. The <\/span><span style=\"font-weight: 400;\">LEMP<\/span><span style=\"font-weight: 400;\"> stack very popular and has been gaining ground on LEMP over the past few years.<\/span><\/p>\n<h2><b>LAMP or LEMP\u2014 which is better?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">There\u2019s no clear \u201cwinner\u201d between LAMP and LEMP and it often comes down to your specific use case.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The Nginx system is event-driven where the Apache system is process-driven. That means Nginx leaves a smaller impression in the system, allowing it to handle a higher load of <\/span><span style=\"font-weight: 400;\">HTTP<\/span><span style=\"font-weight: 400;\"> requests.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And that\u2019s lead to an increase in the use of the LEMP stack among developers.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The LAMP stack, however, is still more common and perhaps a bit easier to get running. It may even be preferable for some simple WordPress installations running on limited resources.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For a full breakdown of the two options, <\/span><span style=\"font-weight: 400;\">check out our comparison article on Apache vs Nginx<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h2><b>Getting started with web servers:<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Okay\u2026<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now that you know you know what a web server is, it\u2019s time to get started building your own little home on the internet!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you\u2019re ready to get started self-hosting your website, we\u2019ve got some great resources to get you started:<\/span><\/p>\n<h4><span style=\"font-weight: 400;\"><strong>LAMP tutorials:<\/strong><br \/>\n<\/span><a href=\"https:\/\/www.ssdnodes.com\/blog\/installing-lamp-on-ubuntu-22-04-lts-jammy-jellyfish\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">How to install a LAMP stack<\/span><\/a><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">How to install WordPress using LAMP<\/span><\/h4>\n<h4><strong>LEMP tutorials:<\/strong><span style=\"font-weight: 400;\"><br \/>\n<\/span><a href=\"https:\/\/www.ssdnodes.com\/blog\/how-to-install-lemp-on-ubuntu-24-04\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">How to install a LEMP stack<\/span><\/a><span style=\"font-weight: 400;\"><br \/>\n<\/span><a href=\"https:\/\/www.ssdnodes.com\/blog\/how-to-install-wordpress-with-lemp-and-mariadb-on-ubuntu\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">How to install WordPress using LEMP<\/span><\/a><\/h4>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Between LAMPs and LEMPs and PHP and other acronyms, web servers can be a confusing lot. Let&#8217;s answer an essential-but-common question: What is a web server?<\/p>\n","protected":false},"author":20,"featured_media":4059,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18],"tags":[],"class_list":["post-5582","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/5582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=5582"}],"version-history":[{"count":5,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/5582\/revisions"}],"predecessor-version":[{"id":13510,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/5582\/revisions\/13510"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/4059"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=5582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=5582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=5582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}