Multiple sites on a single droplet: Apache + nginx

  • Posted October 20, 2013

Looking for best practices to running multiple sites from a single droplet.

I’ve followed instruction to setup a standard LAMP stack but have been suggested to use nginx for managing virtual hosts; which is causing problems with apache running.

Should I use both Apache and nginx? If just nginx, how does that work with a LAMP stack? What should I do to disable Apache sites-available and sites-enabled?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

+1 for nginx. Its FAST, way faster than my last setup and thats without even using Varnish. Varnish is great but requires a bit more work. If you are not that experienced with VPS, nginx is as much work as Apache and much quicker with less resources required. The how to articles listed above and any others in the Articles and Tutorials section on LEMP are all you need to get started. <br> <br>FWIW I am running 6 low traffic sites WP sites and 2 Magento sites off a single LEMP VPS and its still only at 50% capacity. Its more work than shared hosting but the performance gains and cost savings are worth it.

Sticking with Apache for WordPress sites is like sticking with a <a href=“'n+buggy&oq=horse+'n+buggy&aqs=chrome..69i57&sourceid=chrome&espv=210&es_sm=122&ie=UTF-8”>horse 'n buggy</a> when cars were invented. <br> <br>Dump the LAMP stack and go with the LEMP stack, instead. Here’s a very good (i.e., blazing fast) WordPress set-up: <a href=“”>How To Install Wordpress, Nginx, PHP, and Varnish on Ubuntu 12.04</a>. <br> <br>In re: to hosting multiple sites on one droplet, <a href=“”>How To Set Up Multiple WordPress Sites on a Single Ubuntu VPS</a>. However, instead of Apache virtual hosts, use <a href=“”>How To Set Up nginx Server Blocks (Virtual Hosts) on Ubuntu 12.04 LTS</a>, instead.

Hello. <br> <br>Honestly, in all aspects, I would go with Nginx. Here’s the deal, if you have an Apache service you risk getting a Slowloris attack, but with a properly configured server, that shouldn’t be an issue. Apache has been around since about the start of the web, so people usually go with it. The positives of using Nginx is that it uses less memory than that of Apache. “Nginx is about 50 times faster than Apache” - from the people at wikivs -

I’ve had folks suggest I use nginx based upon performance; I’ve previously run a simple LAMP stack with apps like WordPress in the past, if I’m moving from a managed server to a VPS for the first time, what makes the most long-term sense? <br> <br>In other words, what reasons should I look to run Apache instead of nginx (which seems to be what most of my peers are recommending)?

Forgot to mention, those links I gave you were for setting up Apache. If you want a Nginx install tutorial, I suggest for you to watch these two:, <br> <br>Again, if you have any questions, just reply!

You should use either Apache OR Nginx, using both at the same time can become a headache, while it can be done. <br> <br>Watch these tutorials for more info, they should be a help. <br>Installing LAMP: <br>Setting up your domain name: <br>Setting up Apache: <br> <br>If you have any questions, just reply! <br>