Archive for the tag 'Cpanel/WHM'

SBDavid

mod_userdir with Cpanel/WHM

mod_userdir:

A feature of Apache that lets visitors view websites on your server by typing your hostname followed by a tilde and the website owner’s username.

Example: http://host.mywebsite.com/~username

Disabling this via the WHM Security Center is desirable, as the bandwidth used when the site is accessed using this method is attributed to the web host’s main domain, skipping bandwidth monitoring systems.

Reference:

Information on mod_userdir, you should visit http://httpd.apache.org/docs/2.0/mod/mod_userdir.html

SBDavid

Ruby on Rails and cPanel/WHM

Ruby on Rails and cPanel/WHM

The installation of Ruby on Rails in cPanel has two parts, first is installing Ruby itself, which can be accomplished by running

/scripts/installruby

This script will install Ruby, RubyGems, Mongrel and the software that Ruby relies upon and activates the Ruby interface in your end user’s cPanel.

The second step in the installation is running.

/usr/local/cpanel/bin/ror_setup

This script will setup Ruby on Rails so that it will be activated when your system starts.
Ruby runs a separate server other than Apache for serving Ruby on Rails web applications, so setup for this requires a little more work. First you will need to login to your cPanel and click on the Ruby on Rails icon, to bring up the Ruby on Rails management interface that allows you to setup your Ruby environments. At this point, you will need to give your application a name and setup its path.

Note: If you set this path inside of your public_html directory your application’s source code and configuration files can be viewable by anyone on the web.

If you pay close attention to the URL used for the application, you will see that it has a number like :12001 at the end of it. This is because Ruby on Rails does not use the standard Apache web server, but rather uses its own, called Mongrel.

We can change these to be user-friendly. You will need to create a new subdomain or addon domain in cPanel, then click on the create rewrite button next to the Rails application name in cPanel, select the desired domain name from the drop down box, and now, whenever you go to this domain, it will display the RoR application

You will need to ensure
that ports 12001 and up are open (we recommend making the max number of the open ports 12001 plus whatever the number of Ruby applications you expect to be running will be).

Sometimes the gems repos will go down. If this happens during the installation, you will need to re-run /scripts/installruby.

SBDavid

cPanel and WHM Log Files.

The most important information that we  will probably get are from the log files.  If you are new to Cpanel/WHM you would like to know where the log files are located.

In Short /var/log is the place where you can find out all Linux related log files,  but for applications such as Cpanel/WHM  the log file locations are different. 

 

 Log Files 

  • access_log — A file containing a record of IP addresses of visitors that have accessed sites hosted by your server. This file can be found at /usr/local/apache/logs/access_log.
  • cpdavd_error_log — A file that contains a record of errors that were encountered by cpdavd. This file can be found at /usr/local/cpanel/logs/cpdavd_error_log.
  • cphulkd_errors_log — A file that contains a record of errors encountered by the cphulkd. This file can be found at /usr/local/cpanel/logs/cphulkd_errors.log.
  • error_log — A file that contains a record of errors encountered by the Apache web server. This file can be found at /usr/local/apache/logs/error_log.
  • license_log — A file that contains a record of errors that were encountered when cPanel checked its license. This can be found at /usr/local/cpanel/logs/license_log.
  • login_log — A file that contains a record of failed login attempts. This file can be found at/usr/local/cpanel/logs/login_log.
  • stats_log — A file that contains a record of the activities of cpanellogd, the daemon that compiles your server’s web statistics. This file can be found at /usr/local/cpanel/logs/stats_log.
  • tailwatchd_log — A file that contains a record of errors encountered by tailwatchd, the daemon that monitors your server’s logs. This can be found at  /usr/local/cpanel/logs/tailwatchd_log.

 

« Prev