action #179705
open[qe-core] add test module for Apache FastCGI and PHP-FPM
0%
Description
Apache FastCGI and PHP-FPM¶
At moment we don't test Apache FastCGI and PHP-FPM together on openQA. This is a real life scenarios.
The implementation should include following:
install and configure Apache FastCGI and PHP-FPM based on SLES 15 SP7/SLES 16 and openSUSE Tumbleweed check that Apache server is working with php-fmp.service
Please read reference at: https://en.opensuse.org/SDB:Apache_FastCGI_and_PHP-FPM_configuration and create a test module 'apache2-php-fpm.pm'.
It can be scheduled as extra test under console tests.
Some aspects are relevant to the implementation:
firewall open ports for http and https,
guarantee required access to directories /srv/www/htdocs,
add apparmor policy or set selinux as passive mode or add policy (SLES 16, Tumbleweed) if required.
Here example configurations:
php-fpm configuration:
[www] user = wwwrun group = www listen = /run/php-fpm/php-fpm.sock listen.owner = wwwrun listen.group = www listen.mode = 0660
run systemctl restart php-fpm.service later.
create php-fpm.conf and save as /etc/apache2/conf.d/php-fpm.conf
<FilesMatch \.php$> SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost" </FilesMatch>
create test file 'test.php' and verify it can be accessed/displayed in browser:
<?php phpinfo(); ?>
Updated by mgrifalconi 2 months ago
- Subject changed from [qe-core][functinal] add test module for Apache FastCGI and PHP-FPM to [qe-core] add test module for Apache FastCGI and PHP-FPM
- Target version changed from future to QE-Core: Shortlist
To be refined. Some points:
- stack_tests_php could be a good place for this
- schedule on functional, maintenance and opensuse
- focus on functionality with minimal selinux/apparmor fiddling, which might be more a topic of secuirty squad
- keep everything in serial console, so last check can be with curl