Page 1 of 1

apach + php

Posted: 2019/06/06 13:54:24
by Blisk
I have installed apache 2.4.6 and two php version
one in 5.4 which is with centos 7.6
and one I had installed later to work beside 5.4 it is 5.6
I have installed php56-php-fpm and it works on port 9071

and setup in mysite.conf file
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9071"
</FilesMatch>

Problem is that all pages work except this one (nextcloud) which should use php 5.6
I get error HTTP ERROR 500

When I go directly to www.mysite.com/nextcloud/phpinfo.php
I get php info data show up, but when I go to www.mysite.com/nextcloud/index.php
I get error HTTP ERROR 500
what I am missing?

Re: apach + php

Posted: 2019/06/06 14:44:31
by remirepo
Full howto for FPM on
https://developers.redhat.com/blog/2017 ... tion-tips/


500 means server error, so read the log

Probably the php-fpm not running.

Re: apach + php

Posted: 2019/06/06 15:10:34
by TrevorH
Or you forgot to toggle an selinux boolean to allow httpd to make network connections. Use getsebool -a | grep httpd to see the booleans that mention httpd, most likely you want httpd_can_network_connect

Re: apach + php

Posted: 2019/06/06 22:03:51
by hunter86_bg
Our Nextcloud requires read and write access to the data directory.
To verify that, run the following (temporarily):

Code: Select all

setenforce 0
Test and if it works, then you will setup SELINUX the proper way... And you will never have issues with it.

The fact that others recommend stopping SELINUX - shouldn't be a reason to disable it.

Re: apach + php

Posted: 2019/06/07 05:56:18
by Blisk
no I did all.
I have disable SElinux.
I read all about FPM
and there was no error in log.
So what I did is I have installed RH-PHP and after that all worked as it should