Nginx (reverse proxy) + LAMP vs nginx only (LEMP)

January 6, 2016 1.8k views
Nginx Server Optimization Ubuntu

As I am planning to start hosting on DigitalOcean soon, I wanted to use ServerPilot to help me get the basics on the VPS then I add vBulletin myself like I do on any other host. I found out that ServerPilot uses a LAMP stack (Linux, Apache, MySQL, PHP-fpm) and adds a layer of Nginx on the top.

That's a new configuration I never really heard about so I was really wondering what's better, Nginx over Apache, or just Nginx. Since I am going to use WordPress and vBulletin both have static, and dynamic content so which option should one go with?

I know there is an article here on DigitalOcean that compares Apache to Nginx but it basically compares Apache w/mod_php to Nginx with PHP-fpm which is not really fare. Also nginx as a front layer makes the system behave differently so I wanted someone to explain to me if using nginx alone is better than reverse proxy, and why (along with php-fpm in both cases of course)

2 Answers

There's no need to make things overly complex for little to no gain, so if it were me I'd just stick with a standard LEMP stack.

  • Thanks. Just wanted to know if you ever tried ServerPilot, or EasyEngine. They both claim to optimize the configuration for best setup. EasyEngine uses LEMP only, but ServerPilot uses nginx over LAMP (with a guide to disable apache turning it into LEMP only

    So if you ever used any of them, or both, which do one do you recommend, and which do you think will be more optimized? Thanks again.

    • Unfortunately I haven't had the chance of using either so I'm unable to recommend anything although I would advise setting it up manually to learn a little bit about how it works.

I am also very interested in experiences with both these hosting setups. There must be a reason Server Pilot uses Nginx over Apache instead of standard LEMP. I read some things about security improvements with Apache's mod_security plugin.
So far I couldn't find a tutorial on setting up a droplet manually using Nginx + LAMP. I guess there's more configuration left to be done after just installing LAMP and Nginx next to it?

Thanks for any advise in advance!

Have another answer? Share your knowledge.