Nginx VS Apache

Compare Nginx vs Apache and see what are their differences.

Nginx

An official read-only mirror of http://hg.nginx.org/nginx/ which is updated hourly. Pull requests on GitHub cannot be accepted and will be automatically closed. The proper way to submit changes to nginx is via the nginx development mailing list, see http://nginx.org/en/docs/contributing_changes.html (by nginx)
Web

Apache

Mirror of Apache HTTP Server. Issues: http://issues.apache.org (by apache)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
Nginx Apache
99 82
20,211 3,424
1.2% 1.4%
8.9 9.3
2 days ago 3 days ago
C C
- Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Nginx

Posts with mentions or reviews of Nginx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-24.
  • Nginx 1.26.0 Stable Released
    2 projects | news.ycombinator.com | 24 Apr 2024
    Yeah, unless I'm looking at it wrong, there doesn't seem to be any meaningful difference between 1.25.5 and 1.26.0:

    https://github.com/nginx/nginx/compare/release-1.25.5...rele...

  • How to securely reverse-proxy ASP.NET Core web apps
    3 projects | dev.to | 4 Apr 2024
    However, it's very unlikely that .NET developers will directly expose their Kestrel-based web apps to the internet. Typically, we use other popular web servers like Nginx, Traefik, and Caddy to act as a reverse-proxy in front of Kestrel for various reasons:
  • Ask HN: Is nginx.org (the domain-name itself) gone?
    1 project | news.ycombinator.com | 22 Mar 2024
  • Freenginx: Core Nginx Developer Announces Fork of Popular Web Server
    1 project | news.ycombinator.com | 13 Mar 2024
    > I actually don't understand why I am seeing arguments like this all the time.

    Have a look at:

    https://github.com/nginx/nginx/blob/master/src/http/modules/...

    It's got the whole checklist: nginx idiosyncratic module system, inline parsing, custom utf conversion, buffer preallocation and adjustments, linked lists, comments about side effects of custom allocator, and probably other things.

    It's not easy to deal with source like that and any serious improvement to that area would effectively be a rewrite anyway.

    Since anything doing work in nginx is a module anyway, it wouldn't even have to be a full rewrite in one go.

  • The Internet is Maintained by 1 Software Developer
    1 project | dev.to | 25 Feb 2024
    According to this article, nGinx is being used to serve 34% of all websites in the world. I checked out who's contributing to nGinx, and just like I thought, the project has 8,208 commits, and 5,366 of those commits was made by 2 software developers; igorsoev and mdounin.
  • [06/52] Accessible Kubernetes with Terraform and DigitalOcean
    4 projects | dev.to | 23 Feb 2024
  • Freenginx.org
    11 projects | news.ycombinator.com | 14 Feb 2024
  • Performance benchmark of PHP runtimes
    7 projects | dev.to | 17 Jan 2024
    Nginx + Roadrunner (fcgi mode)
  • Web CGI programs aren't particularly slow these days
    1 project | news.ycombinator.com | 8 Jan 2024
    Apache’s mod_fastcgi’s last commit was 2 weeks ago:

    https://svn.apache.org/viewvc/httpd/httpd/trunk/

    It’s a fork of what you linked (and was more popular afaik back when fastcgi was state of the art, and apache was the undisputed champion of web servers).

    These days, nginx has more market share than apache, and its fastcgi module is one of the more recently updated ones in its source tree (5 months vs multiple years):

    https://github.com/nginx/nginx/tree/master/src/http/modules

    If I was going to build an embedded web server, I’d start with nostd rust, probably with though axum + tokio, since thats already memory safe-ish.

    If I needed fastcgi for some reason (dynamically loadable endpoints, or os-level isolation), there are at least four implementations of fastcgi for it. No idea if any are decent though.

  • Five Apache projects you probably didn't know about
    8 projects | dev.to | 21 Dec 2023
    APISIX is an API Gateway. It builds upon OpenResty, a Lua layer built on top of the famous nginx reverse-proxy. APISIX adds abstractions to the mix, e.g., Route, Service, Upstream, and offers a plugin-based architecture.

Apache

Posts with mentions or reviews of Apache. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-20.
  • The 2024 Web Hosting Report
    37 projects | dev.to | 20 Feb 2024
    Single-page applications (SPAs) existed before S3, but given that you still had to set up, scale, and maintain servers using something like Apache or NGINX in order to serve them, the advantages for “Ops” or “DevOps” were not so different to running a “real server” with a language like PHP, python, or Java.
  • Performance benchmark of PHP runtimes
    7 projects | dev.to | 17 Jan 2024
    Apache(prefork mode) + mod_php.
  • BCHS stack: BSD, C, httpd, SQLite
    3 projects | news.ycombinator.com | 28 Dec 2023
    Simiplicity is nice, but there are reasons why Perl and PHP were the popular choices for web stacks in the early 2000's--they are faster and easier to develop with than C and likely safer than C too.

    mod_perl (https://perl.apache.org/) and mod_php (https://cwiki.apache.org/confluence/plugins/servlet/mobile?c...) helped to make Apache httpd (https://httpd.apache.org/) the number one web server in the early days of the web.

  • Apache2 in Local Machine
    2 projects | dev.to | 7 Aug 2023
    https://httpd.apache.org/ - Apache2 website
  • Apache HTTP Server: An Overview of the Open Source Web Server for Multiple Platforms
    1 project | /r/u_webdev20 | 29 Apr 2023
    The Apache HTTP Server project was initially launched in 1995 by a group of web developers and administrators who sought to improve upon the existing web server software available at the time. The project has since evolved into a collaborative effort, with contributors from around the world working together to maintain and enhance the server. Today, the Apache HTTP Server is managed by the Apache Software Foundation, a non-profit organization that oversees the development of numerous open source software projects.
  • Selfmade PVE-Rack
    11 projects | /r/homelab | 17 Apr 2023
    Apache websites of friends and acquaintances
  • What is LAMP stack? LAMP stack components, How LAMP Technologies work Together
    1 project | /r/webdev101 | 31 Mar 2023
    Apache: This is the web server that is used in the LAMP stack. Apache is an open-source web server that provides a flexible and scalable platform for hosting web applications.
  • How do you host a website locally in your personal network?
    1 project | /r/Raksmart | 16 Mar 2023
    Install the web server software: Download the appropriate version of Apache HTTP Server for your operating system from the official website (https://httpd.apache.org/). Follow the installation instructions provided in the documentation.
  • Keeping Your WordPress Website Safe and Secure with WP White Security
    2 projects | dev.to | 11 Mar 2023
    Popular web servers include Apache and Nginx. Apache is the most widely used web server on the internet, and it is known for its flexibility and extensibility. Nginx, on the other hand, is known for its speed and efficiency, and it is often used as a reverse proxy or load balancer.
  • How can I set up a Node server on the cheap?
    2 projects | /r/learnprogramming | 10 Mar 2023

What are some alternatives?

When comparing Nginx and Apache you can also consider the following projects:

Caddy - Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Squid - Squid Web Proxy Cache

envoy - Cloud-native high-performance edge/middle/service proxy

HAProxy - HAProxy documentation

nestjs-monorepo-microservices-proxy - Example of how to implement a Nestjs monorepo with no shared folder

MySQL - MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.

Hiawatha - Hiawatha is an open source webserver with security, easy to use and lightweight as the three key features. Hiawatha supports among others (Fast)CGI, IPv6, URL rewriting and reverse proxy. It has security features no other webserver has, like blocking SQL injections, XSS and CSRF attacks and exploit attempts. The built-in monitoring tool makes it perfect for large scale deployments.

Cherokee - Cherokee Web Server

YARP - A toolkit for developing high-performance HTTP reverse proxy applications.

Lighttpd - lighttpd2 on github for easier collaboration - main repo still on lighttpd.net