Overview
This feature was used to build and publish a Ruby on Rails® application.
The interface was removed in cPanel & WHM version 136. Details are in the cPanel Deprecation Plan documentation.
- Your system administrators must turn the feature on before you can use it.
- Read the Ruby on Rails documentation before you deploy an application.
Create a Ruby on Rails application
Follow these steps to set up a Ruby application:
- Have your hosting provider install Ruby through these EasyApache 4 packages:
- The
ea-apache24-mod_envmodule. - The
ea-ruby24-ruby-develmodule.
- The
- Build a Ruby application on the server. The How to Create Ruby Web Applications article shows an example.
- Register the application with cPanel’s Application Manager interface (cPanel » Home » Software » Application Manager).
Create a Rewrite
Ruby on Rails runs its own server and does not listen on the standard HTTP port 80, so you must give visitors the port to use for your application (for example, example.com:12001).
- Port numbers for Ruby applications go up automatically with each new application. On a shared server, your application gets the next free port.
- Do not assume that your first application will use port
12001.
A rewrite lets visitors reach the application without typing a port number.
To set up a rewrite:
- In the Create A Rewrite table, click Create Rewrite beside the application you want
- Pick the domain, subdomain or addon domain that should serve the Ruby application from the menu.
- To serve it from a new page of your domain, type the page name in the text box provided.
- Click Save.
The Current Rewrites table offers these actions:
- Type a new path name in the text box to rename an application path.
- Click Save to store a rewrite.
- Click Delete to remove a rewrite.
Additional applications and rewrites
Running several Ruby applications requires extra ports answering for Ruby on Rails and, where needed, extra rewrites that hide the port.
- Repeat the steps in the Create a Ruby on Rails application section for each new Rails application.
- Each new application answers on the next free port (if the first one uses port
12001, the second may use12002or a higher number).Warning:Port numbers rise automatically with each new Ruby application, and on a shared server you receive the next free one. Port numbers of your applications may also not follow each other. - For another rewrite, follow the steps in the Create a Rewrite section.
- Every rewrite needs its own domain, addon domain, subdomain or page (for example,
example.com/RubyApplication).Note:Two Ruby applications cannot share the same domain, subdomain, addon domain or page.
Note for resellers and web hosts
In WHM’s Modify an Account interface (WHM » Home » Account Functions » Modify An Account) you can cap how many Rails applications your customers may install. To set the cap:
- Click the domain name you want to restrict.
- Enter the highest number of Rails applications allowed in the Max Mongrel instances (Ruby on Rails) text box.
- Click Save.
