|
taha@asks2
c8fbe42e01
Major refactor. Also added support for Ubuntu 24.
Complete overhaul of how default variables are handled (more in line with most of my other roles). Tested on Ubuntu 24.04. + updated README. + added GPL license (no longer mentioning MIT license in README). + overhaul of defaults has allowed me to finally ditch the "host_restrictions" and "role_constraints" variables, which were never a smart approach to start. |
||
|---|---|---|
| defaults/main | Major refactor. Also added support for Ubuntu 24. | |
| handlers | Major refactor. Also added support for Ubuntu 24. | |
| tasks | Major refactor. Also added support for Ubuntu 24. | |
| templates | Major refactor. Also added support for Ubuntu 24. | |
| vars | Major refactor. Also added support for Ubuntu 24. | |
| .gitignore | Installs Apache configured for mpm-event and PHP-FPM | |
| LICENSE | Major refactor. Also added support for Ubuntu 24. | |
| README.md | Major refactor. Also added support for Ubuntu 24. | |
Apache web server
This role installs Apache from aptitude on Ubuntu 24 (previously tested on 18/20/22).
This role is configured to setup Apache mpm-event with php-fpm.
This role enables SSL configuration by default.
Furthermore, this role does not enable HSTS nor OCSP by default.
Links and notes
- https://www.apachelounge.com/changelog-2.4.html (changes in Apache2 2.4.53 through 2.4.58 now included in Ubuntu 24.04)
Choice of process module and process manager for Apache/PHP
Apache has three different MPMs:
- Pre-fork
- Worker
- Event
PHP-FPM is the FastCGI Process Manager for PHP. FastCGI is based on CGI of yore.
The modern default MPM is event, but installing the process manager mod_php
(it's unclear to me if this is still the default)
forces Apache to run with the elderly mpm-prefork.
This is quite nicely explained in this DigitalOcean tutorial, which
shows how to configure mpm-event with php-fpm.
And also in this Arstechnica article showing how to configure php-fpm (but being a little more unclear on worker/event configuration).
So it sounds like the modern "default" is MPM Event with PHP-FPM. For best performance, we should probably tweak the settings manually (the Ars article has good tips) but I assume the defaults should be enough for most of my needs.
Apache modules
You can inspect the currently enabled Apache mods in this way:
$ ls -1 /etc/apache2/mods-enabled/ | grep \\.load