-
Notifications
You must be signed in to change notification settings - Fork 15
Default TurnKey webserver: Continue with Apache? Switch to Nginx instead? #1582
Description
TurnKey has historically always provided Apache as the "default webserver" for all appliance usage. Where we were only serving a simple landing page provided by us (aka tklweb-cp), we used LigHTTPd. In more recent times, we've continued to use Apache as the "default", except where the requirement is serving simple HTML, or usage as a reverse proxy. Then we're used Nginx in more recent times. Over the years, there have been suggestions/requests to change from Apache2 to Nginx as our "default webserver".
We've considered that a few times, but always landed back on continuing to use Apache as the "default webserver" The rationale has been because of the following points:
- Apache has been one of the most popular webservers available.
- Whilst often considered a somewhat heavy, but full featured webserver; it's performance is still quite good. Even with relatively low resources it compete's relatively favourably with Nginx (using php-fpm).
- Webmin has an Apache2 module which is maintained by the core team (there is a 3rd party Nginx module, which appears to work but has not been updated in ages - I've spoken to the author a few years ago and he claimed that as it still works, so there is no need for updates).
- A1 upstream Apache documentation, plus multitudes of 3rd party documentation and tutorials available online. The vast majority of webserver config docs are for Apache!
- Because of points regarding documentation/tutorial/configuration above, Apache is arguably one of the most newb friendly webservers around.
- Apache has some unique features (e.g.
,htaccessfile support) which many "self hostable" projects leverage to make it easy to install "everywhere" (e.g..htaccessfiles allow snippets of Apache config to be used on shared hosting platforms).
Having said that, there is growing interest in more "modern" and "advanced" features, such as HTTP/2 support (Apache's support requires php-fpm). So some pushback against points raised above could be:
- Nginx is now the most popular webserver. (Apache continues to slowly but surely lose marketshare).
- Nginx is often considered to be a better performer than Apache (our own research suggests that this is not always the case, but it certainly is the public perception).
- We could consider packaging the Nginx Webmin module and either maintaining it and/or discussing with Webmin devs on what might be required to get it included in the default modules.
- Nginx documentation and other online resources (such as tutorials, etc) continue to grow ans Nginx's marketshare continues to grow.
- Whilst Nginx doesn't support
.htaccessfiles, Apache 2 config and.htaccessfiles can be relatively easily converted to Nginx config. E.g. using Nginx docs (and e.g. here). There are even online services, e.g. here and here. - Nginx supports HTTP/2 OOTB. (Apache can support this via php-fpm too, but
mod_phpis where Apache gains it's advantages, so without that, using Nginx seems like a "no brainer"). - probably some other stuff that I haven't thought of...