mod_lsapi... How can I tell if it's working?
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Dominus
  2. 18.06.2015
  3.  Subscribe via email
Sorry if this sounds like a stupid question. CloudLinux has been working great for me for some time.

I\'m pretty confident I\'ve followed the install instructions for mod_lsapi correctly (having read the online docs several times), and I have enabled it for all domains. Following the documented installation steps. I\'ve added the recommended suhosin config php.ini, and then set it up for native PHP using the following commands:

/usr/bin/switch_mod_lsapi --build-native-lsphp
use/usr/bin/switch_mod_lsapi --setup
cagefsctl --force-update
service httpd restart

So... How am I supposed to know if it\'s actually working?

Am I supposed to see something to the efftect \"lsphp\"-like processes showing up when running top? Because I\'m not seeing that.

I\'m on CloudLinux v6.6 WHM v11.50.10 Apache 2.4 PHP 5.5


Secondary question: Is mod-lsapi compatible with xcache?
Rate this post:
  1. 19.06.2015 08:06:07
  2. # 1
Alexey Berezhok Accepted Answer
Posts: 35
Joined: 20.04.2010
0
Votes
Undo
Hello,

1) yes, after installation should appears lsphp processes. You should run: switch_mod_lsapi --enable-global (or enable mod_lsapi for single domain) and after service httpd restart:
/usr/bin/switch_mod_lsapi --build-native-lsphp
use/usr/bin/switch_mod_lsapi --setup
switch_mod_lsapi --enable-global
cagefsctl --force-update
service httpd restart

2) Yes, mod_lsapi compatible with xcache
  1. 19.06.2015 08:06:43
  2. # 2
Alexey Berezhok Accepted Answer
Posts: 35
Joined: 20.04.2010
0
Votes
Undo
\"setup\" command is responsible only for preparation for mod_lsapi (global or single domain mode).
  1. 20.06.2015 12:06:00
  2. # 3
Dominus Accepted Answer
Posts: 2
Joined: 18.06.2015
0
Votes
Undo
OK... as instructed, the following commands ran successfully:

/usr/bin/switch_mod_lsapi --build-native-lsphp 
use/usr/bin/switch_mod_lsapi --setup 
switch_mod_lsapi --enable-global 
cagefsctl --force-update 
service httpd restart 

I've edited /usr/local/apache/conf/conf.d/lsapi.conf to have the following:

lsapi_backend_connect_timeout 3600 
lsapi_backend_connect_tries 10 
lsapi_backend_children 20 
lsapi_backend_pgrp_max_idle 30 
lsapi_backend_max_process_time 300 
lsapi_debug Off

I'm still not seeing lsphp processes. What other steps are involved?
  1. 21.06.2015 20:06:55
  2. # 4
Posts: 19
Joined: 21.04.2011
0
Votes
Undo
You could check a site using phpinfo.
create a phpinfo.php file with just a <?php phpinfo(); ?> in it.
browse it. You should see
Server API LiteSpeed V6.7.1
  1. 22.06.2015 06:06:09
  2. # 5
Alexey Berezhok Accepted Answer
Posts: 35
Joined: 20.04.2010
0
Votes
Undo
Hello,

As I understand output of lsapi.conf above is not full.
can you show output of command:
cat /usr/local/apache/conf/conf.d/lsapi.conf

full file content.


if phpinfo shows not LiteSpeed V6.7.1 - in this case need deeper investigation, write please to helpdesk.cloudlinux.com
  1. 22.06.2015 07:06:56
  2. # 6
Dominus Accepted Answer
Posts: 2
Joined: 18.06.2015
0
Votes
Undo
phpinfo shows LiteSpeed V6.7.1

Full cat of lsapi.conf:
LoadModule lsapi_module modules/mod_lsapi.so



AddType application/x-httpd-lsphp .php5 .php4 .php .php3 .php2 .phtml

# Timeout to connect to backend, in usec.
# Optional, default value is 500000.
# Should be more than 0.
# In the case of wrong format default value will be used.
lsapi_backend_connect_timeout 500000

# Number of tries to connect to backend.
# Optional, default value is 20.
# Should be more than 0.
# In the case of wrong format default value will be used.
lsapi_backend_connect_tries 20

# Maximum number of simultaneously running child backend processes.
# Optional, default value is 80.
# Should be more than 1.
# In the case of wrong format default value will be used.
# In the case of value more than 10000, 10000 will be used.
lsapi_backend_children 80

# How long an control backend process will wait for a new request before it exits, in sec.
# 0 stands for infinite.
# Optional, default value is 30.
# Should be more or equal to 0.
# In the case of wrong format default value will be used.
lsapi_backend_pgrp_max_idle 30

# How long a backend child process will wait for a new request before it exits, in sec.
# 0 stands for infinite.
# Optional, default value is 300.
# Should be more or equal to 0.
# In the case of wrong format default value will be used.
lsapi_backend_max_idle 300

# The maximum processing time allowed when processing a request, in sec.
# Optional, default value is 300.
# Should be more than 0.
# In the case of wrong format default value will be used.
lsapi_backend_max_process_time 300

# How many requests each child process will handle before it exits automatically.
# Optional, default value is 10000.
# Should be more than 0.
# In the case of wrong format default value will be used.
lsapi_backend_max_reqs 10000

# Default value is On.
lsapi_terminate_backends_on_exit On

# Default value is /tmp/mod_lsapi
lsapi_socket_path /tmp/mod_lsapi

# lsapi_phprc /etc/

lsapi_debug Off

# Optional, default value is On.
# Check or not owner of DOCUMENT_ROOT.
lsapi_check_document_root On

# Optional, default value is Off.
# Check or not permissions of target script.
lsapi_target_perm Off


# Optional, default value is On.
# Use or not apache uid/gid for request as fallback.
lsapi_use_default_uid On


# uid/gid for requests
# lsapi_uid_gid 500 501
# or user/group for requests instead of lsapi_uid_gid
# lsapi_user_group user1 user1


# Backend core dump enabled or not.
# Default is Off
lsapi_backend_coredump Off

# Option is ignored. It exists for backward compatibility only.
# lsapi_selfstarter On

# Timeout to poll backend.
# Optional, default value is 0.
# Should be >= 0.
# In the case of wrong format default value will be used.
# 0 stands for infinite poll.
lsapi_poll_timeout 0

# Enable or disable processing of the following directives:
#     php_value, php_flag, php_admin_value, php_admin_flag
# Optional, default value is On.
lsapi_mod_php_behaviour On

# Use or not suexec to target user.
# Default is On
lsapi_use_suexec On




Thanks for the responses. Much appreciated :)
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.

EU e-Privacy Directive

This website uses cookies to ensure you get the best experience using our website and services. If you prefer we don’t use cookies, please disable them in your browser.

You have declined cookies. This decision can be reversed.

You have allowed cookies to be placed on your computer. This decision can be reversed.