Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cloudlinux:enable_passenger [2018/02/26 21:13]
Jackson Zhang
litespeed_wiki:cloudlinux:enable_passenger [2019/01/14 21:43]
Jackson Zhang removed
Line 1: Line 1:
-===== How to enable ​CloudLinux ​Ruby/Python ​selector ​(alt-mod_passenger) for LSWS ===== +===== How to Enable ​CloudLinux Python ​and Ruby Selector ​(alt-mod_passenger) for LSWS ===== 
-To enable ​python ​or Ruby on a shared hosting environment instead of dedicated VPS environment,​ CloudLinux Python and Ruby selector are recommended. If it is not for shared hosting environment,​ you can refer our archive section for LSWS native setup.+To enable ​Python ​or Ruby on a shared hosting environment instead of dedicated VPS environment,​ CloudLinux Python and Ruby Selector is recommended. If it is not for shared hosting environment,​ you can refer to [[litespeed_wiki:​other-ext-apps#​archive|our archive section]] for LSWS native setup.
  
-The Python ​Selector ​and the Ruby Selector ​allow end users to select the specific version of Python or Ruby they need.+The Python and Ruby Selector ​allows ​end users to select the specific version of Python or Ruby they need.
  
 ===== Requirements ===== ===== Requirements =====
Line 8: Line 8:
   * CloudLinux   * CloudLinux
  
-===== Steps to enable ruby/python selector ​===== +===== Steps to Enable Python and Ruby Selector ​===== 
-  - Make sure ruby/python selector ​works properly under Apache (follow [[https://​docs.cloudlinux.com/​index.html?​python_and_ruby_selector.html|CloudLinux ​instruction]] to install and configurate properly ​+  - Make sure Python and Ruby Selector ​works properly under Apache (follow [[https://​docs.cloudlinux.com/​index.html?​python_and_ruby_selector.html|CloudLinux ​instructions]] to install and configure). 
-  - Test Ruby or Python application with Apache and ensure it is running ​ok.  +  - Test Ruby or Python application with Apache and ensure it is running ​OK.  
-  - Run script to install required ruby/python lsapi modules <​code>/​usr/​local/​lsws/​admin/​misc/​enable_ruby_python_selector.sh</​code>​+  - Run script to install required ruby/python lsapi modules<​code>/​usr/​local/​lsws/​admin/​misc/​enable_ruby_python_selector.sh</​code>​
   - Switch to LiteSpeed and try a ruby/python app   - Switch to LiteSpeed and try a ruby/python app
 +
 +===== Troubleshooting =====
 +If your application does not work properly, you can try two simple steps to check if the application has been setup properly:
 +  - If possible, switch back to Apache temporarily to verify if the application works properly under Apache.
 +  - Check if any error has been logged into ''<​APP_ROOT_DIR>/​stderr.log''​. If it has, fix the error and try again.
 +
 +For example:
 +
 +A Python application writes an error to stderr.log under the application root directory, ''/​home/​user1/​dingodossier/​mbntp/​stderr.log'':​
 +
 +<​code>​
 +Traceback (most recent call last):
 +  File "/​home/​user1/​dingodossier/​mbntp/​passenger_wsgi.py",​ line 8, in <​module>​
 +    wsgi = imp.load_source('​wsgi',​ '​mbntp/​wsgi.py'​)
 +  File "/​home/​user1/​virtualenv/​dingodossier_mbntp/​3.4/​lib64/​python3.4/​imp.py",​ line 171, in load_source
 +    module = methods.load()
 +  File "<​frozen importlib._bootstrap>",​ line 1220, in load
 +  File "<​frozen importlib._bootstrap>",​ line 1200, in _load_unlocked
 +  File "<​frozen importlib._bootstrap>",​ line 1129, in _exec
 +  File "<​frozen importlib._bootstrap>",​ line 1471, in exec_module
 +  File "<​frozen importlib._bootstrap>",​ line 321, in _call_with_frames_removed
 +  File "​mbntp/​wsgi.py",​ line 10, in <​module>​
 +    from django.core.wsgi import get_wsgi_application
 +ImportError:​ No module named '​django'​
 +</​code>​
 +
 +This indicates Django was not properly set up for the application. ​
  • Admin
  • Last modified: 2018/09/17 20:27
  • by Lisa Clarke