C
C
coffeehoock2018-04-16 10:38:49
linux
coffeehoock, 2018-04-16 10:38:49

How to attach different versions of php to different hosts?

by default I have php 7.2
enabled In the folders /etc/apache2/sites-enabled/
I have several hosts host1.conf and host2.conf
and in host1.conf there is something like this code

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName site.ru
    DocumentRoot /var/www/html/

      <Directory /var/www/html/>
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Require all granted
      </Directory>
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

and the question is what needs to be written here so that php 5.5 would work for this host1.conf host, for example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
artemmityushov, 2018-04-16
@artemmityushov

Take ready-made dockers with typical settings.
If you don’t feel like it, then look at how to configure different fpm in one Apache and configure each host for the desired fpm.
ON nginx it can be done like two fingers, but in Apache I have never done this, so I can’t say exactly how to do it, but they wrote where to dig above.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question