Now Here - Church Website Designs!

 

Knowledgebase

Portal Home > Knowledgebase > Ruby On Rails > Creating a Rewrite For Ruby On Rails

Creating a Rewrite For Ruby On Rails

Creating a Rewrite For Ruby On Rails

Because Ruby on Rails uses its own server, users visiting your American Netlink website (and subsequently your Ruby on Rails application) will need to be redirected to the appropriate port.

Ruby does not respond on the standard HTTP port number, 80. Thus, visitors would need to specify the port number with the domain — for example, example.com:12001.

 Remember: Ruby application port numbers increment automatically with every new application. This means that, if you are on a shared server, you will simply be assigned the next available port number. Your first application will not necessarily run on port 12001.

To configure Ruby to respond without visitors having to specify a port number, you will need to configure a rewrite.

To configure a rewrite:

  1. Log into cPanel in theAmerican Netlink Client Center.

    Because Ruby on Rails uses its own server, users visiting your website (and subsequently your Ruby on Rails application) will need to be redirected to the appropriate port.

    Ruby does not respond on the standard HTTP port number, 80. Thus, visitors would need to specify the port number with the domain — for example, example.com:12001.

     Remember: Ruby application port numbers increment automatically with every new application. This means that, if you are on a shared server, you will simply be assigned the next available port number. Your first application will not necessarily run on port 12001.

    To configure Ruby to respond without visitors having to specify a port number, you will need to configure a rewrite.

    To configure a rewrite:

    1. Log into cPanel.
    2. Navigate to the Software/Services section of your cPanel interface.
    3. Click the Ruby on Railsicon.
      • This step will open the Ruby on Rails management interface.
    4. Click the Create Rewrite button corresponding to the appropriate application in the Create A Rewrite table.
    5. From the drop-down menu, select the domain, subdomain, or addon domain on which you wish to run your Ruby application.
      • If you wish to run the application from a new page within your domain, type the page name you wish to use into the available text field.
    6. Click the Save button.

    Current Rewrites table actions:

    • To change an application path name, type in the box to the right of the appropriate application name.
    • To save an application rewrite, click Save to the right of the appropriate application name.
    • To delete an application rewrite, click Delete to the right of the appropriate application name. Then, click Yes to confirm.

     

    Additional Applications and Rewrites at American Netlink

    If you intend to run multiple Ruby applications, you will need to configure additional ports to respond using Ruby on Rails and, if necessary, additional rewrites to disguise the port change. To do so, simply add an application as described in the Creating a Ruby on Rails Application section. By default, the new application will respond on the next available port number — for example, if your first application runs on port 12001, the second may run on port 12002 or higher.

    PICK Remember: Ruby application port numbers increment automatically with every new application. This means that if you are on a shared server you will simply be assigned the next available port number. Your first application will not necessarily run on port 12001. This also means that your application port numbers may not be consecutive.

    To configure an additional rewrite, simply follow the steps outlined in the Creating a Rewrite section above. You will need to use a new domain, addon domain, subdomain, or page (for example: example.com/RubyApplication) for the rewrite. You will not be able to configure 2 Ruby applications to respond on the same domain, subdomain, addon domain, or page.

    .
  2. Navigate to the Software/Services section of your cPanel interface.
  3. Click the Ruby on Railsicon.
    • This step will open the Ruby on Rails management interface.
  4. Click the Create Rewrite button corresponding to the appropriate application in the Create A Rewrite table.
  5. From the drop-down menu, select the domain, subdomain, or addon domain on which you wish to run your Ruby application.
    • If you wish to run the application from a new page within your domain, type the page name you wish to use into the available text field.
  6. Click the Save button.

Current Rewrites table actions:

  • To change an application path name, type in the box to the right of the appropriate application name.
  • To save an application rewrite, click Save to the right of the appropriate application name.
  • To delete an application rewrite, click Delete to the right of the appropriate application name. Then, click Yes to confirm.

 

 

Was this answer helpful?

Add to Favourites Add to Favourites Print this Article Print this Article

Also Read