#!/bin/bash set -e . /usr/share/debconf/confmodule chown -R www-data:www-data /var/www/boca chmod -R go-rwx /var/www/boca/src/private # Stop the apache2 server before changing enabled modules systemctl stop apache2 # Ensure that apache's embedded php module is not loaded a2dismod php8.1 # Configure HTTPS in Apache # See https://www.arubacloud.com/tutorial/how-to-enable-https-protocol-with-apache-2-on-ubuntu-20-04.aspx # Enable SSL module a2enmod ssl # Enable default SSL Virtual Host a2ensite default-ssl # Enable apache's shared object cache provider that uses a high-performance # cyclic buffer inside a shared memory segment # See https://httpd.apache.org/docs/2.4/socache.html a2enmod socache_shmcb # Recommended setup before enabling the php-fpm with apache httpd 2.4: enable # fast CGI and set its environment variables # Older tutorials recommended disabling the mpm_prefork module and enabling the # mpm_event one before setting Fast CGI up, e.g. # https://askubuntu.com/questions/1319861/how-to-configure-apache-http-to-php-fpm-on-ubuntu-20-10 # Fortunately, Apache HTTPD version 2.4 already enables the mpm_event by default # according the project's documentation # https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM a2enmod proxy_fcgi setenvif # Enable php-fpm module for apache a2enconf php8.1-fpm # Check the syntax of apache2's configuration file # This DOES NOT CATCH ALL ERRORS apache2ctl configtest # Restart apache2 with the new configuration systemctl start apache2 # Remember to reset possible stored password from debconf db_reset boca-common/dbpassword # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0