H-Sphere Sysadmin Guide

Changing CP URL
(v.2.4 and higher)

 

Related Docs:  

Changing CP URL (before v.2.4) Tomcat Configuration

 

Changing IP Address To Domain Name In CP URL

Sometimes, mostly when you have just installed H-Sphere, you receive the following error while trying to access your Control Panel by domain name:

Control Panel Error
You have entered invalid control panel location. Please enter your account login and password.

In this case, you need to change your hostname to your CP domain name instead of the IP address:

  1. Log into your CP server as the cpanel user:
    su - cpanel
  2. Edit the hsphere.properties file:
    vi ~cpanel/shiva/psoft_config/hsphere.properties
    In the CP_HOST field, enter the domain name instead of the IP address.
  3. Restart H-Sphere.
 

Changing Entire CP URL

Starting from version 2.4, Control Panel runs on the Tomcat servlet engine and therefore CP URL pathname configuration differs from that of JServ in prevous versions.

A typical H-Sphere control panel URL looks similar to
http://example.com:8080/psoft/servlet/psoft.hsphere.CP/
where:
example.com   is the domain name,
psoft/servlet   is the mount point,
psoft.hsphere.CP   is the servlet name.

  1. Login to CP server as the cpanel user:
    su -
    su - cpanel


  2. Change servlet name:
    1. Edit the ~cpanel/hsphere/WEB-INF/web.xml file.
    2. Find the following servlet-mapping construction:
      <servlet-mapping>
          <servlet-name>psoft.hsphere.CP</servlet-name>
          <url-pattern>/psoft.hsphere.CP</url-pattern>
      </servlet-mapping>

    3. Comment out this block with <-- --> tags and add another block with the new servlet name set in the url-pattern tag:
      <servlet-mapping>
          <servlet-name>psoft.hsphere.CP</servlet-name>
          <url-pattern>/example.CP/*</url-pattern>
      </servlet-mapping>
  3. Change mount point:
    1. Edit the ~cpanel/apache/etc/mod_jk.conf file.
      Find and comment out the old mount point line:
      #JkMount /psoft/servlet/* testWorker -- commented out
      Add the new mount point line:
      JkMount /example/servlet/* testWorker
    2. Edit the cpanel/jakarta/conf/server.xml file.
      Find and comment out the following block:
      <!-- commented out
      <Context path="/psoft/servlet" docBase="/hsphere/local/home/cpanel/hsphere"
            reloadable="false" debug="0" allowLinking="true">
         <Resources allowLinking="true"/>
         <Logger className="org.apache.catalina.logger.FileLogger"
            prefix="hsphere_log." suffix=".txt" timestamp="true"/>
      </Context>
      -->

      Replace it with the new block:
      <Context path="/example/servlet" docBase="/hsphere/local/home/cpanel/hsphere"
            reloadable="false" debug="0" allowLinking="true">
         <Resources allowLinking="true"/>
         <Logger className="org.apache.catalina.logger.FileLogger"
            prefix="hsphere_log." suffix=".txt" timestamp="true"/>
      </Context>
  4. Edit ~cpanel/shiva/psoft_config/hsphere.properties.
    Set new values to the CLIENT_CP_URL and CP_URI variables:
    #CLIENT_CP_URL = psoft.hsphere.CP -- commented out
    CLIENT_CP_URL = example.CP
    #CP_URI = /psoft/servlet/psoft.hsphere.CP -- commented out
    CP_URI = /example/servlet/example.CP
  5. Edit the CP index page ~cpanel/shiva/shiva-templates/index.html:
    <HTML>
    <HEAD>
    <meta HTTP-EQUIV="refresh" CONTENT="0; URL=/example/servlet/example.CP">
    </HEAD>
    <center>
    <br>
    <font size=+3>
    <a href="/example/servlet/example.CP">Control Panel</a>
    </font>
    </center>
    </HTML>
  6. Restart H-Sphere.

 


Related Docs:  

Changing CP URL (before v.2.4) Tomcat Configuration



© Copyright 1998-2004. Positive Software Corporation.
All rights reserved.