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
.htaccessinside 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
.htaccessfiles. 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
| Point | Apache | Nginx |
|---|---|---|
| Ease for beginners | Easier, uses .htaccess | A bit harder |
| Static files | Good | Very good |
| Memory on busy sites | Uses more | Uses less |
| Per-folder rules | Yes | No |
Which one should you pick?
- If you use shared hosting, you usually do not choose. The host sets it up for you.
- If you use WordPress with many plugins that write
.htaccessrules, Apache is simple. - If you expect heavy traffic or serve many images, Nginx is a strong choice.
- 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.