Some error on when enabling mod_lsapi on cPanel server
Announcement
Collapse
No announcement yet.
Apache mod_lsapi issues
Collapse
X
-
Hello,
Thanks for the great work you did on mod_lsapi and releasing it to production. We have waited years to change to something else than suPHP!
Today I have tested this on 4 different productions servers. Both Cloudlinux 7.2 and Cloudlinux 6.7.
On one server all sites went down after installing:
yum install liblsapi liblsapi-devel
yum install cpanel-mod-lsapi
Then on another server they stopped working when running:
/usr/bin/switch_mod_lsapi --setup
Well, I restarted Apache/MySQL and after some minutes they were back again.
But you should also add to your howto (http://docs.cloudlinux.com/index.htm...mod_lsapi.html) that cagefs should be updated a couple of times as I had to do manually in order to get things working:
cagefsctl --force-update
I also had to run switch_mod_lsapi --build-native-lsphp since sites using native php stopped working.
Well, some minutes of downtime we can live with.
The last server I tried I cannot get it working. Nothing in Apache error_log but in sulsphp_log I found these:
[Tue Apr 26 13:34:21 2016] sulsphp: uid 651/username1); gid 650/username1); with suexec mode; cmd /usr/local/bin/lsphp)
[Tue Apr 26 13:35:31 2016] sulsphp: uid 1301/username2); gid 1299/username2); with suexec mode; cmd /usr/local/bin/lsphp)
Have any idea how to fix these?
-
Hello,
First, we apologize for incorrect information in our docs, you should run $ yum install mod_lsapi instead of cpanel-mod-lsapi, and follow our instructions further.
If you still face any issue, please create a ticket at https://helpdesk.cloudlinux.com, and we would be happy to assist you.
Comment
-
Thanks, but yum install cpanel-mod-lsapi worked fine also. Whats the difference? Please also update your docs then.
Should sulsphp_log log entries like this all the time even if the site is loading fine:
[Tue Apr 26 13:34:21 2016] sulsphp: uid [img WIDTH=16 HEIGHT=16]https://%C2%A0651/username1" rel="no... 651/username1); gid [img WIDTH=16 HEIGHT=16]https://%C2%A0650/username1" rel="no... 650/username1); with suexec mode; cmd [img WIDTH=16 HEIGHT=16]https:///usr/local/bin/lsphp)%C2%A0"...cal/bin/lsphp)
[Tue Apr 26 13:35:31 2016] sulsphp: uid [img WIDTH=16 HEIGHT=16]https://%C2%A01301/username2" rel="n...1301/username2); gid [img WIDTH=16 HEIGHT=16]https://%C2%A01299/username2" rel="n...1299/username2); with suexec mode; cmd [img WIDTH=16 HEIGHT=16]https:///usr/local/bin/lsphp)%C2%A0"...cal/bin/lsphp)
Comment
-
I stumbled upon a new issue.
I switched on mod_lsapi on the whole server, but there are spesifically one customer that is getting 500 error on their page because of symfony framwork.
And when trying to do:
/usr/bin/switch_mod_lsapi --disable-domain domain.tld
The domain is still using mod_lsapi. Why? Is that not possible to enable the whole server and disable those who have issues?
In order to get this working I had to disable cagefs on that account and then site is loading fine and checking phpinfo.php I see its using mod_lsapi:
Server APILiteSpeed V6.9
Comment
-
Ive also found that a cagefsctl --force-update was required after enabling it globally.
One edge case weve encountered is PHP breaking for customers with custom .htaccess rules like:
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
This will cause the page to download until they either comment this out or or change to application/x-httpd-lsphp.
Is there any way to keep x-httpd-php5 working so these customers don need to make any changes?
Ive noticed that our servers with LiteSpeed Web Server and Alt-PHP work with both x-httpd-php5 and x-httpd-lsphp.
Comment
-
I am looking to enable mod_lsapi globally, after running it successfully for about a year, for certain domains. It is really a great product.
I am watching this thread, as Im very interested in what is the proper procedure to change the handler for some customers back to suPHP, if needed.
- Scott
Comment
-
Answering all questions at once.
Morten1. cpanel-mod-lsapi is an alias to mod_lsapi, so yum will install proper package
2. it is normal that sulsphp_log is filled with such calls
3. its not possible to disable mod_lsapi after it was enabled globally
Ryan
Do you use LiteSpeed as web server and not apache? If so you do not need mod_lsapi as actually you already have it. It goes from there https://www.litespeedtech.com/produc...speed-sapi/php
ScottWe are preparing webinar about handling mod_lsapi where I will try to cover many situations and answer ongoing questions.
Welcome all
Comment
-
I have some servers with Apache + Mod_Lsapi and some with LiteSpeed.
The Apache + Mod_Lsapi servers dont work if they have AddType application/x-httpd-php5 in their .htaccess file and they must comment it out or change it to x-httpd-lsphp. Just a edge case that is breaking some sites after the switch to Mod_lsapi that Im checking if its possible to avoid.
On a LiteSpeed server with Alt-PHP they can use x-httpd-php5 or x-httpd-lsphp in .htaccess and itll work without any issues.
Comment
-
Bug: Each time we run yum install mod_lsapi Apache goes down. It will not get back up again before I do a service httpd restart.
Bogdan: Will it be possible to enable all acounts on a server and disable single domains in newer releases of mod_lsapi?
That will help in order to resolve issues for customers that face problems after enabling mod_lsapi. And instead of enable/disable a whole server with 500-100 accounts that would be a much easier way for us.
Comment
-
Did try a new server now and after /usr/bin/switch_mod_lsapi --setup I saw this in ssh:
Updating user username...
Traceback (most recent call last):
File "/usr/share/cagefs/cagefsctl.py", line 4307, in main
main_func()
File "/usr/share/cagefs/cagefsctl.py", line 4787, in main_func
setup_cl_alt(config)
File "/usr/share/cagefs/cagefsctl.py", line 3919, in setup_cl_alt
reload_php_for_users(all_users = True)
File "/usr/share/cagefs/cagefsctl.py", line 3367, in reload_php_for_users
reload_processes(php, user)
File "/usr/lib/python2.6/site-packages/clcommon/clfunc.py", line 90, in reload_processes
os.kill( int(parts[0] , signal.SIGHUP )
OSError: [Errno 3] No such process
Reconfiguration completed
Seen that before?
Comment
-
Yes, if you change PHP version with easyapache you have to build native-lsphp with command you gave. Nothing critical but until that done customers with native PHP will use old version.
The error "OSError: [Errno 3] No such process" could be ignored so far, we will add exception to handle it properly.
So far there is no way to disable single domain if lsapi enabled globally, but we need to thing about it.
Comment
Comment