How to add version specific php directive into the Apache configuration??

2 posts / 0 new
Last post
#1 Tue, 01/29/2019 - 21:09
colech

How to add version specific php directive into the Apache configuration??

I have a custom server template that gets applied when I create new domains. This PHP stuff is automatically getting inserted from somewhere into the Apache configuration files...

AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5.6
AddHandler fcgid-script .php7.0
AddHandler fcgid-script .php7.1
AddHandler fcgid-script .php7.2
AddHandler fcgid-script .php7.3
FCGIWrapper /home/associatedappraisersofww/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/associatedappraisersofww/fcgi-bin/php5.6.fcgi .php5.6
FCGIWrapper /home/associatedappraisersofww/fcgi-bin/php7.0.fcgi .php7.0
FCGIWrapper /home/associatedappraisersofww/fcgi-bin/php7.1.fcgi .php7.1
FCGIWrapper /home/associatedappraisersofww/fcgi-bin/php7.2.fcgi .php7.2
FCGIWrapper /home/associatedappraisersofww/fcgi-bin/php7.3.fcgi .php7.3

...but I know know how or where the above is being added from? Maybe from /usr/share/webmin/virtual-server/php-lib.pl?

I want to add the following to the above automatically inserted php stuff. As you can see it's also php version specific... so how can made it so the php version gets updated when/if the php version is changed in virtualmin?

<FilesMatch "\.php$">
SetHandler "proxy:unix:/var/run/php/php7.0-fpm.sock|fcgi://localhost"
</FilesMatch>

My system...

  • Ubuntu 18.04 LTS
  • PHP 5.6, 7.0, 7.1, 7.2, 7.3
  • Apache 2.4.37
  • Using http 2.0
Wed, 04/10/2019 - 01:41
agentbleu

Hey, I notice you're using 18.04 with HTTP 2, can I ask how you got that http2 working as I'm getting a conflict with php7.2,

The following modules depend on mpm_prefork and need to be disabled first: php7.2

"There is no workaround., mpm_event and php as a mod are incompatible."

"You can, of course, use php-fpm with mpm_event." ??

Topic locked