Author Topic: [Tutorial] Fix PHP-FPM file permission denial  (Read 16905 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
[Tutorial] Fix PHP-FPM file permission denial
« on: October 14, 2019, 11:46:15 AM »
As you might already know PHP-FPM "trial" has ended and now you have to pay to use it.

To continue using PHP/PHP-FPM Selector you need to have CWPpro.

If you have activated it and don't want to keep using it (since you have to pay for it), you have to disable it, otherwise your websites will be down after a couple of time (even if you fix the file permissions that the service requests).
This issue is due to a file permission change on file "/opt/alt/php-fpm72/usr/sbin/php-fpm" by something on the server that is taking down this pay-to-use-service, since you haven't paid to use it, you don't have the right to use it, which is fair enough.

[Proceed bellow at your own risck - this is how I've done it, follow along by your own choice]

Before you doing this, i highly recommend you to backup this folder, since this process will rebuild your vhosts and you might need to fix some configurations later:
/usr/local/apache/conf.d/vhosts

So to disable it, you need to go to the side menu called "WebServer Settings" - "WebServers Domain Conf" and select one of your users (you need to do this to every user you have)


After you select the user, select domains tab, check all your checkboxes you have on all your domains that you have on this user you have selected and then click on "Custom config all selected"


Then select apache->php-cgi. On "Apache Configuration" group options, leave it as default and make sure you select the option to rebuild webservers


Don't forget to do the same to your sub-domains, and domains of all users you have:


Then to test this, connect via SSH and send out these commands:
Code: [Select]
service httpd reload
service httpd restart
service php-fpm72 stop

And take a look if your websites are now working again.
If you have "Internal Server Error" you might need to fix your new vhosts, based on your backup files.
Some other problems might occur, be ready to fix them :) i just needed to do this.
« Last Edit: October 15, 2019, 06:50:14 AM by Administrator »

Offline
*
Re: [Tutorial] Fix PHP-FPM file permission denial
« Reply #1 on: November 12, 2019, 02:13:39 PM »
Can you share your these settings?
1.
WebServers Settings>Setup default Web Servers
2.
Manage WebServers Configuration
3.
Manage WebServers Configuration

I have made this post and the issue still exist. I have already moved all my main websites to the alternative panel.
But I wanted to know how a free control panel provider is resolving its user's problems.

http://forum.centos-webpanel.com/updates/502-error-for-websites-hosted-on-cwp/

Thank you.