Optimized Setup for Running Drupal on Debian 9
Renowned web developer Fredrik Jonsson recently published a comprehensive blog post detailing an optimized setup for running Drupal on Debian 9 with Apache 2.4, utilizing HTTP/2, event MPM, and PHP-FPM. Although the focus is on Drupal, this setup is equally suitable for other PHP-based systems like WordPress and Joomla, as well as static sites.
One of this setup's key advantages lies in utilizing the event MPM (Multi-Processing Module) within Apache. With event MPM, static files are handled directly without involving the PHP component unless necessary. This efficient approach eliminates the need for PHP to be dragged along for every request, enhancing performance and resource utilization.
Debian 9, the chosen operating system, has Apache 2.4.25, PHP 7, and MariaDB 10.1. These updated versions, combined with the implementation of HTTP/2, further boost the server's overall performance. Notably, PHP 7 is particularly beneficial for all PHP-based applications, including Drupal, due to its significant improvements and optimizations.
While minimal modifications are required to adapt this setup for Debian 9, the blog post also includes detailed information about HTTP/2. It presents an example virtual host configuration that focuses exclusively on TLS (Transport Layer Security). With the availability of free certificates from Let's Encrypt, many reasons exist to embrace TLS for improved security and various other advantages.
Fredrik Jonsson emphasizes the ease and benefits of implementing this setup, providing developers and administrators with practical guidance for optimizing their PHP-based systems on Debian 9. By leveraging the power of Apache 2.4, event MPM, HTTP/2, and PHP-FPM, users can enhance the performance and security of their websites or applications.
Jonsson's blog post offers valuable insights into creating a robust and efficient server environment, allowing web developers and system administrators to harness the full potential of their chosen PHP-based platforms.