The needs of your customers differ from each other. With the Ruby Selector, the end user can select the Ruby version for applications and also install additional modules (gems) to the application environment. Since Ruby Selector uses mod_passenger it gives optimum performance.
Let’s see the steps to create end user access for Python and Ruby Selector.
1. Go to the Software/Services section in cPanel and choose Select Python Environment/Select Ruby Environment.
2. You will see the create project form. Select the interpreter version for your application, application folder name (project path) and URI in order to access your application. To create an application, click on “Create project”.
After few minutes, a new application entry will be added to the web-page.
3. The path (folder name of the project in the home directory, for example, /home/clman1/project_name), uri for application and wsgi handler can be edited. When you click on Edit – the value gets converted to input field and then becomes editable. When you complete editing, click on Save.
4. Wsgi entry is for specifying the python wsgi application entry point. It should be in the form of filename, which is callable and separated by colon. In case, your app is running from file flask/run.py by calling callable app, set flask/run.py:app.
5. When you click on Show control, python extensions section will get expanded. With this you will be able to add or remove python modules. When you start typing in input field, you are given appropriate hints in drop-down list. Select the entry you want from drop-down and click on Add.
If you click Delete, the corresponding module entry will get deleted.
Along with setting path, uri and wsgi, you can change the interpreter version by changing the value in select drop-down.
6. The changes won’t be applicable to the application environment till you click the Update button. Prior to clicking the Update button, you can revert all changes with Reset button.
You will get the newly created application with stub only. It is important to put the real application into the application folder. You can set the wsgi parameter, after application is placed into the application folder.
For deleting the application click Remove – the application folder itself will remain unmoved.
Note: For LVE Manager version 0.9-10 and higher:
You can use the key –domain while creating an application which joins the application to domain. If there isn’t any specific domain key, by default the main user’s domain will be used.
To create application run the below command:
/usr/bin/selectorctl --interpreter=<python|ruby> --version=VERSION
[--user=USER] [--domain=DOMAIN] [--print-summary] [--json]
–-create-webapp <FOLDER_NAME> <URI>
When you change the application URI, –domain key can be used at the same time. Here the URI as well as the application domain will be changed.
Run the below command to change application URI:
/usr/bin/selectorctl --interpreter=<python|ruby> [--user=USER]
[--domain=NEW_DOMAIN] [--print-summary] [--json] --transit-webapp
You can select a domain while creating an application from the web interface too.
It is also possible to run simple commands from web interface (e.g. it is possible to install packages from specific repositories or control web applications with the help of django-admin).
This way you can create the end user access for Python and Ruby Selector.