I think it'd be really useful to have an alternative LAMP app using the LEMP stack instead (basically just replacing Apache with Nginx). If this is possible, it'd be great to see this in the Cloudron App Store alongside the LAMP app.
For context... this thread is what made me want to suggest this idea more formally: https://forum.cloudron.io/topic/5784/apache-vulnerabilities/
In some cases, Nginx can be much more performant than Apache too particularly under heavier loads, so it'd be good to have Nginx as an option instead of only Apache for those who want to really eek out a bit more performance of their web servers.
Some external references supporting this idea of Nginx being a better performer than Apache:
https://hackr.io/blog/nginx-vs-apache - "NGINX performs 2.5 times faster than Apache according to a benchmark test performed by running up to 1,000 simultaneous connections. Another benchmark running with 512 simultaneous connections, showed that NGINX is about twice as fast and consumed less memory. Undoubtedly, NGINX has an advantage over Apache with static content. So if you need to serve concurrent static content, NGINX is a preferred choice."
https://kinsta.com/blog/nginx-vs-apache/ - "In short, Apache uses processes for every connection (and with worker mpm it uses threads). As traffic rises, it quickly becomes too expensive. [...] Event mpm goes a bit further in terms of optimization, but some tests show that it can’t outrun Nginx. Especially when we talk about static files, where Nginx serves as much as double the requests that Apache does. Nginx ideally has one worker process per CPU/core. The difference of Nginx worker processes is that each one can handle hundreds of thousands of incoming network connections per worker. There is no need to create new threads or processes for each connection. This is the reason why major Content Delivery Networks, like Cloudflare, MaxCDN, and our partner KeyCDN — or websites like Netflix — find Nginx crucial for their content delivery.
Wondering if there may be any more interest in this, and if this could be added sometime soon. I may try to tackle packaging such an app soon if I can figure it out, but if one is already in progress or won't take long to do by others, may choose a different app to try to package instead.
@girish Was just meant to be an alternative to the LAMP app for applications where Nginx may be better-suited than Apache. There seemed to be some interest in that in some other posts previously but wasn't sure if this was an easy thing to do or not.
@jdaviescoates Sure. So at a real high level, nearly every performance test I've seen out in the wild shows Nginx to perform far better than Apache in number of RPS (requests per second) especially under heavier loads. So one could presume to some degree that any app where a focus on performance is required may be better served behind Nginx instead of Apache.
WordPress is one such example where performance is critically important, and if one can squeeze out much more traffic with less memory by using Nginx instead of Apache, then it makes sense why a LEMP app would perhaps be more beneficial to some users where performance is extra important.
In most cases, LAMP is perfectly fine, but there are cases where LEMP can be more performant and in some cases can even use less memory to achieve similar results of a LAMP app, which additionally makes LEMP more suited for lower memory systems too.
that is also because Nginx uses FPM and not FastCGI(Apache in some cases can use FPM) for PHP, which give already a good boost.
NextCloud and WP could take good advantage of it, and Nginx could help solve the issue of the main image being too "fatty"
It's easy to use Nginx in a multi-layer image.