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.
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.
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.
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.