Use this tag (along with an appropriate programming-language tag) for programming questions relating to the Apache HTTP Server


Nginx ("engine x") is a web server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

Faster static assets

Quality Example

"Nginx is typically faster than apache but with a low request server it hardly matters"

from question "Apache is slow with concurrent requests"

"And finally from my experience nginx is faster than apache"

from question "How to run two instances of the same Play! Framework application?"

"Nginx is faster than apache and the configuration is easier"

from question "Symfony 2 performance optimisations"

"Nginx is faster than apache handles slow clients better and is generally easier to use"

from question "OS X: Development & Production Deployment for RoR with Apache and Passenger"

"Very fast static assets nginx is faster than apache at serving static assets css js images ... and uses very little memory to do so"

from question "Magento: Lighttpd vs Nginx"

"For example nginx is considered faster than apache and a nodejs application is considered faster than a php application"

from question "Why is async code considered so much faster than synchronous?"

"Nginx works great by itself and will likely be much faster than apache"

from question "Nginx only or Nginx(reverse proxy) + Apache"

"Paradoxally it does not mean that apache is faster than nginx it just means that on 1 2 3 ."

from question "Will a Multi-Core / Multi-Proc help performance on a web server?"

"I have recently read that nginx is faster than apache"

from question "Apache + php-fpm vs Nginx + php-fpm"

"I read that nginx is faster than apache and i want to try it with some of the projects and leave the others with apache"

from question "Ubuntu server with RVM, Phusion Passenger, Apache and Nginx"

"Nginx â without any optimizations done â is much faster than apache"

from question "Nginx: Is it safe to use "open_file_cache" in this scenario?"

"Not only is nginx supposedly faster than apache at delivering static content but this also offloads your rails application for every image stylesheet javascript or whatever other static content"

from question "A route to serve static assets (like .jpgs, etc?)"

"For example nginx is much faster than apache"

from question "Key factors for designing scalable web based application"

"Nginx will definitely work faster than apache"

from question "Nginx/apache/php vs nginx/php"

"You can serve it from for example nginx varnish which are usually faster than apache"

from question "Which is faster, plain HTML or stored HTML from database?"

More popular

"Apache is more popular and has more features nginx is smaller and faster and has less features"

from question "Ruby on Rails Server options"


"I would really like not to run both apache and nginx i did switch everything to apache yet found it loaded my proxies slower than nginx"

from question "Nginx two server ports two php sites (help)"

Still faster

"Nginx is still faster and i might choose it but apache isn t asleep"

from question "Why use Apache over NGINX/Cherokee/Lighttpd?"


"How can nginx performs better than apache"

from question "Why nginx performs better than apache httpd server?"

"I want to move to nginx since it s better than apache"

from question "Nginx Mod_Rewrite all pages"

"Also what makes nginx better than apache in this case"

from question "Nginx Vs Apache to solve load isseu on website"

Much faster

"I am not an expert in deployment but in my experience nginx is much faster and more friendly to django compared to apache"

from question "Is there a way to speed up the authenticate function in django?"


"For me apache is easier to use but i prefer nginx as it is much faster"

from question "Build file server to upload files from IPhone and Mac using Raspberry Pie"

Long polling request

Quality Example

"I think you would like lemp e stands for the nginx and for a lot small projects it would be better than apache"

from question "Do I have to use PHP if I am running a WAMP/MAMP/LAMP stack?"

"Nginx also happens to be better than apache at writing logfiles interestingly"

from question "Some fundamental but important questions about web development?"

"I aways heart that nginx performs better than apache server"

from question "Why nginx performs better than apache httpd server?"

"Why nginx might be better than apache when one is long polling and why long polling is better than periodically polling a server"

from question "Where does a beginner learn about the technology behind thrift and web servers?"

"Nginx with its own mod_wsgi seems to perform even better than apache but hey you didn t ask about that"

from question "Better webserver performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi"

"The remote server is set up to allow very few maximum concurrent clients generally nginx handles many concurrent clients better than apache since it doesn t need to fork a new process for every request so if it becomes an issue you might want to look into switching web servers"

from question "Whats the limit on asynchronous request to a PHP script making CURL requests"

"Nginx is better at handling requests since it does not spawn a new process for every request unlike apache"

from question "Apache + mod_wsgi vs nginx + gunicorn"

"I recommend you to use nginx as an reverse proxy since the configuration is easier and the performance is much better than apache"

from question "Proxy HTTP requests using subdomain"

"Nginx is better suited than apache as it is light and single threaded vs apache thread per request in most normal setups"

from question "Why do we need apache under Node.js express web framework?"

"4 i d like to understand why nginx might be better than apache when one is long polling and why long polling is better than periodically polling a server"

from question "Where does a beginner learn about the technology behind thrift and web servers?"

"Uwsgi is better if you are using nginx i find nginx far better than apache personally"

from question "Using django based mod_wsgi and raw python based mod_python together on same apache"

"Nginx + gunicorn is likely to work better than apache + modwsgi at this point in time"

from question "Nginx serving Django static media | 502 bad gateway"

"Apache made a claim that apache 2.4 will offer performance as good or better than nginx"

from question "Low latency web server/load balancer for the non-Twitters of the world"

"If you want to use something in front of it though i suggest you use something like nginx better than apache since nginx is also asynchronous like node and it s performs really well at serving static files"

from question "Regarding the using expressjs on Apache web server"

"16 cores apache would scale better than nginx while nginx would process more client requests"

from question "Will a Multi-Core / Multi-Proc help performance on a web server?"


"Nginx can be configured to only respond to requests matching a predefined pattern far easier than with apache"

from question "Nginx only serve jpeg files"

Setting resources performant

Quality Example
More flexible

"Also you should consider using nginx as server that s more flexible than apache"

from question "Laravel routes returning 404 after move from xampp to apache 2.4.7. mod_rewrite or htacess or missing apache setting?"

More complicated

"I am not going into how to do rewrites on nginx because it is much more complicated than apache"

from question "How to output a javascript file from a PHP file that can be referenced from a script include tag"

More performant

"Nginx is more performant than apache in most cases with high-levels of requests"

from question "Apache server running at nearly 100%"

More efficient

"Nginx or other server is not much more efficient than apache"

from question "Long Polling with PHP on Apache"

Much more efficient

"Next you ll find that the threading model of nginx is much more efficient than apache s for what you re doing"

from question "Php webservice doesn't handle multiple requests at the same time"

Less resources

"Also when your setting up the server i would say start with nginx it s uses less resources than apache"

from question "How to scale a web application"

Web lighter proxy

Quality Example
Usually better performance

"Note that in any case for increased security and fast static file css js delivery you might want to add a reverse proxy layer nginx usually provides better performance but apache works as well before the nodejs python server"

from question "A website design : how do I combine node.js with php?"


"I have no idea what i m doing so i dove nose-first into nginx -- which i had never used before -- because someone told me it s better than apache at dealing with lots of small tasks and requests -- not that i would know how to turn apache into a proxy mind you"

from question "Domain name and port based proxy"

"Although this thread is more than a year old it still merits from the fact that no one mentioned about the not so recent innovations of nginx lighty and other web servers which scale much better than apache at higher concurrency and consume lesser resources"

from question "Advice on implementing a web server"

Better solution just

"I ve heard it suggested that i use nginx as a reverse proxy in front of apache and node.js is that a better solution than just nginx"

from question "Long Polling Options: Nginx, PHP, Node.js"


"Is nginx + php-fpm is suppose to do server operations much faster than apache + mod-php due to efficient usage of memory and other resources"

from question "Is Nginx + php-fpm is suppose be much faster than Apache + mod-php"

"I have configured tomcat with apache web server in past and never slowness problem before and practically speaking nginx is said to much lighter and faster than apache web server"

from question "Why Nginx response extremely slow while accessing my Rails app (Both running on same Windows machine)?"

"Nginx is faster and lighter but many people find it easier to work with apache because of .htaccess support nginx does not have an analog due to performance concern"

from question "Apache and Nginx together, why?"

Better performance

"Tornadoweb and nginx are popular web servers for the moment and many benchmarkings show that they have a better performance than apache under certain circumstances"

from question "Is 'epoll' the essential reason that Tornadoweb(or Nginx) is so fast?"

Static files file

Quality Example

"I know nginx has lower memory footprint and little faster than apache in serving static files"

from question "Pyramid - apache + mod_wsgi or nginx +uwisgi or nginx +pserve + supervisord"


"Nginx s static file performance is better than apache"

from question "What is the best way to deploy a Pylons app?"

Much more

"Serving static files with nginx is much more efficient than with apache"

from question "Apache and Nginx both on port 80"


"There seems to be a consensus that nginx serves static content faster than apache"

from question "Apache, Nginx, and static content"

"For static file serving i found nginx performance lot faster than apache"

from question "Which server is best suitable for image hosting?"

"I will add that i ve often heard that nginx is faster than apache for serving static files to the point that it s sometimes worth using nginx for static files and reverse proxying to apache for dynamic content"

from question "Is it a common choice to deploy an AngularJS app to a vanilla Apache HTTP server?"

"When i was googling info on nginx it appears to be faster than apache and works well in serving static pages"

from question "Is NginX good for Forums? Is NginX really fast?"

"I ve read that nginx is faster for static pages but there are questions about its performance with php compared to apache s performance with php"

from question "Linux PHP Webserver + Apache or Nginx"

"As an added benefit nginx can also serve static files much faster than apache and nginx also uses much less ram and can handle much more connections"

from question "Flushing the HTML document early - with ini_set( 'zlib.output_compression','ON')?"


Quality Example
Less memory

"Nginx uses less memory than apache given the size of your setup i would definitely recommend that"

from question "Which of these would be the best Ruby on Rails server setup?"

"Also nginx uses a lot less memory than apache"

from question "Mod_fcgid: can't apply process slot for error"

"Servers like lighthttp and nginx can handle large amounts of traffic in much less memory than apache if you can sacrifice apache s power and flexibility or if you just don t need those things which often you don t"

from question "Tactics for using PHP in a high-load site"

"Also have a look at nginx for example it is fast and uses less memory than apache to handle client connections"

from question "How to stop timed out ajax call using JQuery"

Easier configuration

"Any one of the reverse proxy systems can likely do this nginx is popular too and generally has easier configuration than apache but i ve never used it with https"

from question "Play-framework [2.0] HTTPS"


"Now back to the question my guess based on reading tests published here would be that the proper multi-thread apache architecture should scale better than nginx on multi-core cpus"

from question "Will a Multi-Core / Multi-Proc help performance on a web server?"

"I will say that nginx tends to handle heavier loads better than apache though so take a look at that"

from question "Node.js/express/mongodb instead of apache/mysql?"

Mod_php much more stable

"Apache mod_php is much more stable and cleaner while nginx will often deliver http bad gateway error coded in 502"

from question "Do you know any reason to use Apache instead of Nginx?"

More efficient

"In fact nginx can use select instead of epoll if you compile it with the --with-select_module option and i bet it will still be more efficient than apache"

from question "Is 'epoll' the essential reason that Tornadoweb(or Nginx) is so fast?"


"Apache is more friendly configuration wise htaccess htpasswd rewrite rules etc nginx is fast in regard to static assets"

from question "Linux PHP Webserver + Apache or Nginx"

"Apache is more flexable then nginx but it comes with a high price in performance"

from question "Apache vs Nginx for Chat Web App"

"Nginx is more picky about case of file names than apache"

from question "Codeigniter nginx 404 error"

More experience

"I also know there is nginx and haproxy although i have never used either of them and have a lot more experience with apache"

from question "Possible to load balance across nodejs servers using apache"


"Nginx is actually quite a lot easier than apache in my opinion"

from question "Angular2 + Nginx Deep Linking/Routing Issue"

"But doing that kind of things with apache is rather painfull and is easier with nginx"

from question "Apache2 starts only with sudo"


"I m about to try apache but most write ups suggest that this is worse than nginx at this job"

from question "HTML5 Server-Sent Events prototyping - ambiguous error and repeated polling?"

Significantly more complex

"However my experience is that configuring it in apache is significantly more complex than configuring it in nginx and even with worker it still is not quite as efficient with nginx"

from question "Apache or nginx ? I like to understand the basic working flow of Nginx , its advantage and disadvantage"

More straight forward

"The switchover to nginx really had little to do with the rewrite rule and more to do with getting away from apache 2.2 default upstream version for centos however with nginx rewrite rules are more straight forward than apache s imo"

from question "Apache rewrite - Virtual dir to php script"

Sometimes better

"Id love to know how to solve this since using nginx sometimes is a better option than apache and having this issue with fuelphp framework and not being able to use this two great tools together is awful"

from question "How to configure nginx rewrite rules for fuelphp framework?"

More busy

"It seems your apache is more busy than your nginx"

from question "Nginx error recv() failed (104: Connection reset by peer)"


"Nginx is very fast much lighter than apache"

from question "How to make Node.js Multi-tenant for websites on port 80?"


"I ve been attempting to upgrade to php 7.1 using phpbrew and elected to install it with nginx as i read everywhere that it was simpler than apache not that simple in my humble opinion"

from question "Symfony2, phpbrew, nginx, php 7.1 and File not found"

More traffic

"Apache s design is thread per client while nginx uses the reactor pattern meaning - nginx can handle much more traffic than apache as a web server about 50 times the number of requests"

from question "Storing all JS/CSS in PHP?"


"Nginx uses an event based non blocking single thread and the memory usage is relatively much lower than apache"

from question "Is Apache blocking I/O?"

More flexible

"Also nginx s configuration is much more flexible than apache and by having it on the front end it gives you a lot of flexibility"

from question "Will an Nginx as reverse proxy for Apache help on dynamic content only"


"Hi everyone i need help with this i ve already set up nginx + php and it works great faster than apache my problem is how to setup a multiple projects in one ip"

from question "How to Set Up Multiple projects in one IP in nginx"

Less resource-hungry

"I m new to nginx and want to try it out since it apparently is much faster and less resource-hungry than apache but i can t see why this would be such a hard thing to achieve"

from question "Can't get Apache-like multiviews functionality in nginx"

More clean

"The syntax for nginx configuration is different but more clean than apache"

from question "Magento Installation Issue (Install Not Being Found)"


"Nginx is quicker though honestly you ll struggle to see the difference except for very high volume sites and has quickly become the web server of choice for a lot of people if you don t have any specific need for apache for your code"

from question "Node js with apache or nginx?"


"We have a few clients who have very high traffic sites running apache slower than nginx with varnish in front of it and they get way more traffic than you are saying with little to no performance problems"

from question "What would be a good auto-scaling and ELB configuration for a heavy-traffic Wordpress site on Amaon EC2?"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0