Pitfalls for migration from apache php_module to fcgi?
-
I am working on a server with two WordPress sites (v5.9) and multiple other services. Everything is served with Apache (v2.4.6).
Now I am about to create a new PHP service, which should also being talked to via Apache. Therefore I would like to migrate from Apache php_module (PHP 7.2) to php_fpm and mod_proxy_fcgi.
There are plenty of tutorials and docs for both ways of using Apache, PHP and WordPress, but I did not see any hints for this kind of migration.
What do need to be aware of? Where are the pitfalls?
Here is my current Apache configuration
php.conf:
# # The following lines prevent .user.ini files from being viewed by Web clients. # <Files ".user.ini"> <IfModule mod_authz_core.c> Require all denied </IfModule> <IfModule !mod_authz_core.c> Order allow,deny Deny from all Satisfy All </IfModule> </Files> # # Allow php to handle Multiviews # AddType text/html .php # # Add index.php to the list of files that will be served as directory # indexes. # DirectoryIndex index.php # mod_php options <IfModule mod_php7.c> # # Cause the PHP interpreter to handle files with a .php extension. # <FilesMatch \.(php|phar)$> SetHandler application/x-httpd-php </FilesMatch> # # Uncomment the following lines to allow PHP to pretty-print .phps # files as PHP source code: # #<FilesMatch \.phps$> # SetHandler application/x-httpd-php-source #</FilesMatch> # # Apache specific PHP configuration options # those can be override in each configured vhost # php_value session.save_handler "files" php_value session.save_path "/var/lib/php/session" php_value soap.wsdl_cache_dir "/var/lib/php/wsdlcache" #php_value opcache.file_cache "/var/lib/php/opcache" </IfModule>One of the WordPress sites as Apache Vhost:
<Ifmodule mod_ssl.c> # Listen 443 <VirtualHost *:443> DocumentRoot "/var/www/wp-cockpit.de/" ServerName wp-cockpit.de ServerAlias www.wp-cockpit.de <Directory "/var/www/wp-cockpit.de/"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog "/var/log/httpd/webServer-error_log" CustomLog "/var/log/httpd/webServer-access_log" combined SSLEngine on # SSLCertificateFile /etc/letsencrypt/live/co2-avatar.com/fullchain.pem SSLCertificateFile /etc/letsencrypt/live/co2-avatar.com/cert.pem SSLCertificateChainFile /etc/letsencrypt/live/co2-avatar.com/chain.pem SSLCertificateKeyFile /etc/letsencrypt/live/co2-avatar.com/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf #SSLCertificateFile /etc/letsencrypt/live/co2-avatar.com/fullchain.pem #SSLCertificateKeyFile /etc/letsencrypt/live/co2-avatar.com/privkey.pem # SSLCertificateChainFile /etc/letsencrypt/live/co2-avatar.com/chain.pem </VirtualHost> </IfModule>
The topic ‘Pitfalls for migration from apache php_module to fcgi?’ is closed to new replies.