@black3dynamite said in Nextcloud 12/CentOS 7 -- Problem with code integrity check:
@emad-r said in Nextcloud 12/CentOS 7 -- Problem with code integrity check:
@black3dynamite
I ll try my best to answer:
You can have either but not both, PHP as Apache HTTPD module or PHP as FPM, If you want to setup PHP-FPM on centos instead of PHP module or mod_php, and then PHP-FPM starts as an systemctl service, you will need to carry on those steps:
Install Apache:
yum -y install httpd
systemctl enable httpd
systemctl start httpd
Install PHP-FPM:
yum -y install php
yum -y install php-fpm
Configure Apache httpd:
nano /etc/httpd/conf.d/php.conf
<FilesMatch \.php$>
# SetHandler application/x-httpd-php
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
Then:
systemctl start php-fpm
systemctl enable php-fpm
systemctl restart httpd
For me if I want to make any web app, I just simply go this route, back in the day I would make it faster by running Nginx, but most third party web apps expect apache, and I found out the by simply using PHP-FPM with Apache I can make the web app as responsive and fast as ever, and I never found scenario where that is not compatible, what you simply do is remove PHP being child of apache, and giving it daemon of its own with children, and it becomes very fast.
The setup on CentOS is different compare to Fedora 27.
Installing php also installs php-fpm.
[root@localhost hjohnson]# dnf install php
Last metadata expiration check: 2:30:05 ago on Wed 07 Feb 2018 08:46:00 AM MST.
Dependencies resolved.
============================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================
Installing:
php x86_64 7.1.14-1.fc27 updates 2.8 M
Installing dependencies:
nginx-filesystem noarch 1:1.12.1-1.fc27 fedora 20 k
php-cli x86_64 7.1.14-1.fc27 updates 4.2 M
php-common x86_64 7.1.14-1.fc27 updates 1.0 M
php-json x86_64 7.1.14-1.fc27 updates 72 k
Installing weak dependencies:
php-fpm x86_64 7.1.14-1.fc27 updates 1.5 M
And its already configured /etc/httpd/conf.d/php.conf
# Redirect to local php-fpm if mod_php is not available
<IfModule !mod_php5.c>
<IfModule !mod_php7.c>
# Enable http authorization headers
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
<FilesMatch \.(php|phar)$>
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
</FilesMatch>
</IfModule>
</IfModule>
Yup I noticed this with Fedora, and when I jump to Fedora , or when Centos gets updated to reach Fedora levels like in 3-5 years I will worry about that. I never reached scenario where I needed bleeding edge server, and if that is the case usually it is Ubuntu and not Fedora.