apach + php

Issues related to applications and software problems
Post Reply
Blisk
Posts: 264
Joined: 2011/07/04 14:49:51
Contact:

apach + php

Post by Blisk » 2019/06/06 13:54:24

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?

User avatar
remirepo
Posts: 329
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: apach + php

Post by remirepo » 2019/06/06 14:44:31

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.
Remi's Repository - Forum - Blog

User avatar
TrevorH
Forum Moderator
Posts: 25806
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: apach + php

Post by TrevorH » 2019/06/06 15:10:34

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
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

hunter86_bg
Posts: 1789
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: apach + php

Post by hunter86_bg » 2019/06/06 22:03:51

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.

Blisk
Posts: 264
Joined: 2011/07/04 14:49:51
Contact:

Re: apach + php

Post by Blisk » 2019/06/07 05:56:18

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

Post Reply