Let's start saying that I have read this, this and this at Remi Blog since the question it related to those repositories. The blog entries is not helping me at all or I am missing something here but I am not sure what is. I will expose below which steps I have followed and let's see what I am doing wrong. I am planning to install PHP 5.6.x and PHP 7.0 as SCL (because I need to test some applications on both and I need to keep PHP 5.6.x support due to some Wordpress development) and I will use Apache 2.4.x through SetHandler so below are the steps:
Install the Software Collections tools:
yum install scl-utils
Download a package with repository for your system (in this case for httpd24)
wget http://www.softwarecollections.org/en/scls/rhscl/httpd24/epel-6-x86_64/download/rhscl-httpd24-epel-6-x86_64.noarch.rpm
Install the repo package:
yum install rhscl-httpd24-epel-6-x86_64.noarch.rpm
Install the collection:
yum install httpd24
Start using software collections:
scl enable httpd24 bash
Start httpd24 service (default option)
service httpd24-httpd start
Install PHP56 as SCL:
yum install php56 php56-php-common php56-php-cli php56-php-fpm php56-php-gd php56-php-intl php56-php-mbstring php56-php-mcrypt php56-php-opcache php56-php-pdo php56-php-pear php56-php-pecl-apcu php56-php-imagick php56-php-pecl-xdebug php56-php-pgsql php56-php-xml php56-php-mysqlnd php56-php-pecl-jsonc php56-php-pecl-zip php56-php-process php56-runtime
Start PHP56-FPM:
service php56-php-fpm start
Install PHP70 as SCL:
yum install php70 php70-php-common php70-php-cli php70-php-fpm php70-php-gd php70-php-intl php70-php-mbstring php70-php-mcrypt php70-php-opcache php70-php-pdo php70-php-pear php70-php-pecl-apcu php70-php-imagick php70-php-pecl-xdebug php70-php-pgsql php70-php-xml php70-php-mysqlnd php70-php-pecl-jsonc php70-php-pecl-zip php70-php-process php70-runtime
Test Apache is installed and running:
http://mylocalip
And success I can see Apache default page for RedHat/CentOS. All good so far. I have created a file under /var/www/html/info.php
with the following code:
<?php
phpinfo();
?>
When I try to reach by running:
http://mylocalip/info.php
It says file not found so Apache is going to the wrong place, that's fine then I edit the file under /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf
and change DocumentRoot
from /opt/rh/httpd24/root/var/www/html
to /var/www/html
and I did the same change everywhere I found the same issue, I have restarted Apache and tried again but I got the same error. I have checked permissions for /var/www/html
and this is how they looks like:
# ls -l /var/www/
drwxrwsr-x 3 apache root 4096 Nov 13 04:51 html
what I miss here? What I am doing wrong? Can any give me some ideas or help on this?