Skip to content
BENIBIX Learn

Nginx vs Apache

People think Nginx and Apache are the same program under two names, and they are not. Both are free web servers. Nginx keeps its settings in a few main files and handles many visitors with little memory. Apache can also read a small settings file in each folder. That is handy on shared hosting, but slower.

Infrastructure🌍 Web Serving & Nginx

Nginx

A fast, free web server. It can also stand in front of your apps.

Nginx is a free, open-source web server. It can handle many visitors at once and use little memory. One master process reads the settings. Worker processes answer the requests. It often sits in front of apps as a reverse proxy. It can also serve files, handle TLS and cache answers.

Example
Jack installs Nginx on his Ubuntu server. It sends his images straight from disk and passes every other request to his Node.js app.
Why it matters
It is one of the most used web servers in the world. Most server guides you meet will use it.
Full entry
Infrastructure🌍 Web Serving & Nginx

Apache HTTP Server

An old, free web server. You add the parts you need.

The Apache HTTP Server is a free, open-source web server from the Apache Software Foundation. It has been around since the 1990s and still runs many sites. It is built from modules you switch on, so it can do a great deal. Rules for one folder can sit in a file called .htaccess inside it. On Ubuntu, its main settings file is apache2.conf.

Example
A shared host runs Apache for hundreds of small sites. Each customer sets their own redirects in a .htaccess file. The main settings stay the same.
Why it matters
Many hosts and older guides still use it. Knowing it helps when you move a site from one server to another.
Full entry

In one line

Nginx
A fast, free web server. It can also stand in front of your apps.
Apache HTTP Server
An old, free web server. You add the parts you need.