← Back to Apache Course | Chapter 1: Introduction & Setup | Lesson 1 of 4

What is Apache?

Apache HTTP Server (usually just called Apache) is a program that runs on a computer and hands out web pages to anyone who asks for them. When you type a website address into your browser, something has to listen for that request and send back the HTML, images, and other files that make up the page -- Apache is one of the most widely used programs that does exactly that job.

A Web Server, Not a Website

Apache itself isn't a website -- it's the software that *serves* websites. It listens on a network port (port 80 for plain HTTP, 443 for HTTPS), accepts incoming requests from browsers, figures out which file or program should handle each request, and sends a response back. The actual content -- HTML files, images, a PHP or Django application -- lives separately; Apache is the layer in between the internet and that content.

A Brief History

Apache was first released in 1995 by the Apache Group (now the Apache Software Foundation) and quickly became the dominant web server of the early internet. Its name is often said to come from "a patchy server" -- a set of patches applied to the original NCSA HTTPd server it was based on. Decades later it still powers a huge share of websites, alongside newer servers like Nginx.

What Apache Actually Does

For a static site, Apache reads an HTML file straight off disk and sends it back as-is. For a dynamic site, it hands the request off to something else -- a PHP interpreter via mod_php or PHP-FPM, or a Python app via a proxy to Gunicorn/uWSGI -- waits for the result, and forwards that back to the browser. It also handles things every web server needs: routing requests to the right directory, serving files with the right MIME type, compressing responses, and logging every request.

Note: Apache's behavior is controlled entirely through configuration files and modules, not code you write from scratch -- most of this course is about editing those config files correctly.

Apache vs. Nginx vs. Others

Apache isn't the only web server -- Nginx, Microsoft IIS, and LiteSpeed are common alternatives. Apache's traditional strength is its huge module ecosystem and its .htaccess per-directory configuration, which made it a favorite for shared hosting. Nginx is often praised for handling large numbers of simultaneous connections with less memory. In practice both are capable, production-grade servers, and it's common to see Nginx placed in front of Apache as a reverse proxy.

{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
Common Mistakes
  1. Thinking Apache *is* the website, rather than the program that serves it -- the actual pages, images, and application code live in separate files Apache just reads and sends.
  2. Assuming Apache is required to build a website at all -- it's one implementation choice among several (Nginx, IIS, etc.), not something every web project needs.
  3. Confusing the Apache HTTP Server with other Apache Software Foundation projects (Apache Kafka, Apache Spark, Apache Tomcat) that share the "Apache" name but do unrelated things.
🔒

Chapter Quiz — Complete all 4 topics to unlock

0/4 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.