Using CentOS 7 and need to run two different versions of php for the websites, 
php 7.0 and 7.2. The set up is x.x.x.x/site1 and x.x.x.x/site2 and I am using 
php-fm for both php versions configuring port 9002 for php 7.0 and 9003 for php 
7.2.

I have a conf file for each site (this is site 1 which is supposed to run php 
7.0) and called site1.conf, similar to:

<VirtualHost *:80>
        ServerAdmin xxx
        ServerName x.x.x.x/site1
        DocumentRoot /var/www/html/
        DirectoryIndex info.php
        ErrorLog /var/log/httpd/site1-error.log
        CustomLog /var/log/httpd/site1-access.log combined

    <IfModule !mod_php7.c>
        <FilesMatch \.(php|phar)$>
            SetHandler 
"proxy:unix:/var/opt/rh/rh-php70/run/php-fpm/www.sock|fcgi://localhost"
        </FilesMatch>
    </IfModule>
</VirtualHost>

The other site is identical and supposed to run php 7.2 so the file obviously 
uses site2 instead of site1 and php72 instead of php70.

I have installed both php versions and can successfully switch between them on 
the commandline but have run into problem getting apache to use both. I 
consulted 
https://www.digitalocean.com/community/tutorials/how-to-run-multiple-php-versions-on-one-server-using-apache-and-php-fpm-on-centos-7
 but apachectl configtest complains that "module php7_module is already loaded, 
skipping". I can successfully get the websites to use the same php version, 
either 7.0 or 7.2.

I must have missed some configuration step and would appreciate any pointers.

Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to