Leap 15.2, apache2, php7, mpm-event, fcgi
Hi, I'm really quite lost currently. I'm trying to change my LAMP setup based on 15.2 to use event MPM and PHP through fcgi and fpm. I just don't get it to work though. I had expected to find massive amounts of docs how to do it because of LAMP being an extremely common usecase and apache prefork being an extremely weak choice resource wise. I found quite some tutorials for other distributions which didn't work. I also found https://en.opensuse.org/SDB:Apache_FastCGI_and_PHP-FPM_configuration obviously but following that just does not work for me. The situation I'm ending up with is that I get a directory listing when entering my webserver target. Calling index.php directly offers to download it. I guess there is probably missing only a very small piece in the article above but I'm not able to figure it out. Anyone an idea? Thanks, Wolfgang
On 3/5/21 5:19 PM, Wolfgang Rosenauer wrote:
Hi,
I'm really quite lost currently. I'm trying to change my LAMP setup based on 15.2 to use event MPM and PHP through fcgi and fpm.
I just don't get it to work though. I had expected to find massive amounts of docs how to do it because of LAMP being an extremely common usecase and apache prefork being an extremely weak choice resource wise.
I found quite some tutorials for other distributions which didn't work. I also found https://en.opensuse.org/SDB:Apache_FastCGI_and_PHP-FPM_configuration obviously but following that just does not work for me.
The situation I'm ending up with is that I get a directory listing when entering my webserver target. Calling index.php directly offers to download it.
I guess there is probably missing only a very small piece in the article above but I'm not able to figure it out.
Anyone an idea?
Thanks, Wolfgang
I set it up per: https://wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP Which basically leaves you with the following related httpd.conf entries: LoadModule mpm_prefork_module modules/mod_mpm_prefork.so ... LoadModule unixd_module modules/mod_unixd.so ... <IfModule unixd_module> LoadModule fcgid_module modules/mod_fcgid.so </IfModule> <IfModule mpm_prefork_module> LoadModule cgi_module modules/mod_cgi.so </IfModule> ... LoadModule php_module modules/libphp.so AddHandler php-script .php ... Include conf/extra/httpd-mpm.conf Include conf/extra/php_module.conf Include conf/extra/httpd-mpm.conf Include conf/extra/php-fcgid.conf The additional includes just set the number of servers started, etc.. and add handling of php extensions, etc.. just the generic behavior of mpm and fcgi itself which whatever openSUSE provides as defaults will do. It's just a different way of telling apache to use php. With php5, you simply loaded modphp, now there are about 4 steps. -- David C. Rankin, J.D.,P.E.
Hi, Am 06.03.21 um 05:01 schrieb David C. Rankin:
On 3/5/21 5:19 PM, Wolfgang Rosenauer wrote:
I'm really quite lost currently. I'm trying to change my LAMP setup based on 15.2 to use event MPM and PHP through fcgi and fpm.
I set it up per:
When I look at the section "Using php-fpm and mod_proxy_fcgi" which is what I want to achieve it doesn't hold any new information though. php-fpm is running and listening on 127.0.0.1:9000 proxy modules in apache are loaded: proxy_module (shared) proxy_http_module (shared) proxy_fcgi_module (shared) /etc/apache2/conf.d/mod_fcgid.conf is left quite default but: DirectoryIndex /index.php index.php <FilesMatch "\.php$"> SetHandler "proxy:fcgi://127.0.0.1:9000" </FilesMatch> But still as described accessing the web page (incl. php scripts directly) does not "run" PHP.
Which basically leaves you with the following related httpd.conf entries:
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
Want to use event but that doesn't appear to be the issue.
LoadModule unixd_module modules/mod_unixd.so > <IfModule unixd_module> LoadModule fcgid_module modules/mod_fcgid.so </IfModule>
What is this about? It seems not required when using fpm
... LoadModule php_module modules/libphp.so AddHandler php-script .php
libphp.so is not in use when using fpm I think? So your setup is not really using the fcgid / fpm combination I'd say I'm trying to leverage? Thanks for trying to help anyway, Wolfgang
participants (2)
-
David C. Rankin
-
Wolfgang Rosenauer