SOLVED: Uninstall CloudLinux, SUPHP still being set to "1"

TomR

Verified User
Joined
Jan 7, 2008
Messages
51
In ininstalled CloudLinux from a CentOS7 server.
Now I am unable to start httpd because of errors in httpd.conf.

No custom templates, no *cust_http*.

Culprit seems in template: |*if SUPHP="1"|

How ever in options.conf
# PHP Settings
php1_release=7.4
php1_mode=php-fpm
php2_release=8.0
php2_mode=php-fpm
php3_release=8.1
php3_mode=php-fpm
php4_release=8.2
php4_mode=php-fpm
secure_php=no
php_ini=no
php_timezone=Europe/Amsterdam
php_ini_type=production
x_mail_header=yes

So why stays SUPHP=1??
 
That is exactly what i want to know and do not understand.
I was under the impression that due to my choices in options.conf it would be 0 in stead of 1.
Other servers has the same templates and are working well?
My question should be: How and where is SUPHP set?

And has it something to do with ininstalling CloudLinux?
 
If we still talk about the IF-statement, it is only a condition. The statement does not change SUPHP to have a value of 1.

What error do you have in Apache? What do you see with
Code:
apachectl -t
?
 
[root@koda ~]# apachectl -t
AH00526: Syntax error on line 44 of /usr/local/directadmin/data/users/proguide/httpd.conf:
Invalid command 'suPHP_Engine', perhaps misspelled or defined by a module not included in the server configuration

Problem is dat due to SUPHP the following code is inserted::

suPHP_Engine ON
suPHP_UserGroup proguide proguide

But what sets the value of SUPHP, because the template on other servers is identical, and there the conflicting code is not inserted ( probbly due to SUPHP value )
 
Run

Code:
cd /usr/local/directadmin/custombuild/
./build php
./build apache

then, it should fix the issue.
 
Nope did that several times. Even build everthing with custombuild.
My question remains: how is the value of SUPHP set? Due to options.conf? Because that does not seem the case.
I even delete /usr/lib/apache because id had mod_suphp.so present.
After build apache it is not present anymore but still the same error.
 
Check whether you have custom files with suPHP instructions inside of them:

Code:
ls -la /usr/local/directadmin/data/users/*/domains/*.cust*

and/or:

Code:
grep -n -i suphp /usr/local/directadmin/data/users/*/domains/*.cust*
?
 
As stated in the first post:
No custom templates, no *cust_http*.

[root@koda ~]# ls -la /usr/local/directadmin/data/users/*/domains/*.cust*
ls: cannot access /usr/local/directadmin/data/users/*/domains/*.cust*: No such file or directory
[root@koda ~]# grep -n -i suphp /usr/local/directadmin/data/users/*/domains/*.cust*
grep: /usr/local/directadmin/data/users/*/domains/*.cust*: No such file or directory
 
Mu gut feeling sys me it has something to do with uninstall CloudLinux. Maybe something has been left behind.
 
Code:
cd /usr/local/directadmin/custombuild/
./build list_removals
?

and then

Code:
./build remove_items
?
 
No clue for suphp

[root@koda data]# pwd
/usr/local/directadmin/data
[root@koda data]# find . -type f | xargs grep -n suphp
./templates/logs.list:5:/var/log/suphp.log=suPHP Log
./templates/httpd.conf:178:<IfModule mod_suphp.c>
./templates/httpd.conf:211: <IfModule mod_suphp.c>
./templates/apache.logrotate:1:/var/log/httpd/access_log /var/log/httpd/agent_log /var/log/httpd/error_log /var/log/httpd/referer_log /var/log/httpd/suexec_log /var/log/suphp.log {
./templates/user_virtual_host.conf:33: <IfModule mod_suphp.c>
./users/admin/httpd.conf:12: <IfModule mod_suphp.c>
./users/tomr/httpd.conf:12: <IfModule mod_suphp.c>
./users/proguide/httpd.conf:12: <IfModule mod_suphp.c>
 
[root@koda custombuild]# ./build list_removals

If you want to remove all the suggested programs above, run: ./build remove_items
[root@koda custombuild]# ./build remove_items


No output?
Need I do a build php and apache now?
 
Will do a build again, but wil take some time ( 4 PHP versions ).
Thanks for your help so ;)far
 
[root@koda ~]# apachectl -M 2>&1 | grep suphp
[root@koda ~]# grep suphp /etc/httpd/ -R
/etc/httpd/conf/extra/httpd-suphp.conf:<IfModule mod_suphp.c>
/etc/httpd/conf/httpd.conf_2.0:Include conf/extra/httpd-suphp.conf
grep: warning: /etc/httpd/build/build: recursive directory loop
 
Sadly after build php & apache same problem

[root@koda custombuild]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-03-02 20:10:53 CET; 369ms ago
Process: 2181810 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 2181807 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2181807 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."

Mar 02 20:10:52 koda.proguide.nl systemd[1]: Starting The Apache HTTP Server...
Mar 02 20:10:53 koda.proguide.nl httpd[2181807]: AH00526: Syntax error on line 44 of /usr/local/directadmin/data/users/proguide/httpd.conf:
Mar 02 20:10:53 koda.proguide.nl httpd[2181807]: Invalid command 'suPHP_Engine', perhaps misspelled or defined by a module not included in the server configuration
Mar 02 20:10:53 koda.proguide.nl systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 02 20:10:53 koda.proguide.nl kill[2181810]: kill: cannot find process ""
Mar 02 20:10:53 koda.proguide.nl systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 02 20:10:53 koda.proguide.nl systemd[1]: Failed to start The Apache HTTP Server.
Mar 02 20:10:53 koda.proguide.nl systemd[1]: Unit httpd.service entered failed state.
Mar 02 20:10:53 koda.proguide.nl systemd[1]: httpd.service failed.
 
What do you see with
Code:
./build options
?

Do you have php-fpm processes running?

Code:
ps aux | grep -v grep | grep php
?


OK, I would try to remove completely Apache and install it again.

Code:
rm -f /etc/logrotate.d/apache
rm -rf /var/log/httpd
rm -rf /var/www/icons
rm -rf /var/www/cgi-bin
rm -rf /var/www/error
rm -rf /var/www/manual
rm -rf /usr/lib/apache
rm -rf /usr/include/apache
rm -rf /etc/httpd
rm -f /usr/sbin/apachectl
rm -f /usr/sbin/htcacheclean
rm -f /usr/sbin/httpd
rm -f /usr/sbin/rotatelogs
rm -f /usr/sbin/suexec
rm -f /usr/sbin/apxs
rm -f /usr/bin/ab
rm -f /usr/bin/htdbm
rm -f /usr/bin/htdigest
rm -f /usr/bin/htpasswd
rm -f /usr/bin/logresolve
 
[root@koda custombuild]# ./build options
Nginx Unit: no
Apache: 2.4.55
ModSecurity: 2.9.7
ModSecurity Rule Set: comodo
htscanner: 1.0.1-enhanced
Dovecot: 2.3.20
Dovecot configuration: yes
AWstats: no
Exim: 4.96-58-g4e9ed49f8
exim.conf update: yes
BlockCracking: yes
Easy Spam Fighter: yes
SpamAssassin: 4.0.0
SpamAssassin rule updates: daily
ClamAV: yes
MySQL: no
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
MySQL compress backups: no
PHP (default): 7.4 as php-fpm
PHP (additional): 8.0 as php-fpm
PHP (additional, 3rd): 8.1 as php-fpm
PHP (additional, 4th): 8.2 as php-fpm
phpMyAdmin: 5.2.1-all-languages
ProFTPD: 1.3.8
Pure-FTPd: no
RoundCube webmail: 1.6.1
Replace "php.ini" with './build all' and './build php_ini': no
Cron for notifications and (or) updates: yes
Cron frequency: daily
Auto notifications: yes
Auto notifications email address: [email protected]
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: yes
Show texts in bold: no
SquirrelMail: no
Zend Guard Loader: no
ionCube loader: no
Suhosin: no
 
[root@koda custombuild]# ps aux | grep -v grep | grep php
root 2180395 0.0 0.2 298708 11152 ? Ss 20:09 0:00 php-fpm: master process (/usr/local/php74/etc/php-fpm.conf)
root 2180425 0.0 0.2 196048 11260 ? Ss 20:09 0:00 php-fpm: master process (/usr/local/php80/etc/php-fpm.conf)
root 2180459 0.0 0.3 300756 11764 ? Ss 20:09 0:00 php-fpm: master process (/usr/local/php81/etc/php-fpm.conf)
root 2180489 0.0 0.3 301244 12088 ? Ss 20:09 0:00 php-fpm: master process (/usr/local/php82/etc/php-fpm.conf)
 
Back
Top