Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Nginx or Apache: which web server should you use?

Nginx and Apache are the two most popular web server programs. This guide explains how they differ and helps you pick one.

Web Hosting2 min read4 steps

What is a web server?

A web server is a program that waits for visitors. When someone types your website name, the web server finds the right files and sends them back. Think of it as a waiter in a restaurant. It takes the order and brings the food.

Meet Apache

Apache is the older and more common one. It has been used for many years. Many hosting plans and control panels like cPanel use it.

  • It reads a small settings file called .htaccess inside your site folders. You can change rules without restarting the server.
  • It has many add-on parts called modules. Most website tools and guides assume Apache.
  • It starts a new helper for many visitors, so it can use more memory on busy sites.

Meet Nginx

Nginx (say "engine-x") is newer. It is built to handle many visitors at once with little memory.

  • It is very fast at sending plain files such as images, CSS and JavaScript.
  • It does not read .htaccess files. All rules live in the main settings files, so a change needs a reload.
  • It is often placed in front of other programs as a "reverse proxy". That means it receives visitors first and passes the request on to another program.

Side by side

PointApacheNginx
Ease for beginnersEasier, uses .htaccessA bit harder
Static filesGoodVery good
Memory on busy sitesUses moreUses less
Per-folder rulesYesNo

Which one should you pick?

  1. If you use shared hosting, you usually do not choose. The host sets it up for you.
  2. If you use WordPress with many plugins that write .htaccess rules, Apache is simple.
  3. If you expect heavy traffic or serve many images, Nginx is a strong choice.
  4. If you want both, you can put Nginx in front and Apache behind it. Many servers do this.
Tip: Not sure what your plan uses? Ask Hostvento support through a ticket at https://secure.hostvento.com/submitticket.php.

Quick recap

  • A web server sends your site files to visitors.
  • Apache is common, flexible and uses .htaccess.
  • Nginx is light, fast and great under heavy traffic.
  • Both are good. Pick based on your site and your tools.