|
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:
- Log into your CP server as the cpanel user:
su - cpanel
- 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.
- 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.
- Login to CP server as the cpanel user:
su -
su - cpanel
- Change servlet name:
- Edit the ~cpanel/hsphere/WEB-INF/web.xml file.
- Find the following servlet-mapping construction:
<servlet-mapping>
<servlet-name>psoft.hsphere.CP</servlet-name>
<url-pattern>/psoft.hsphere.CP</url-pattern>
</servlet-mapping>
-
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>
- Change mount point:
- 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
- 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>
- 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
- 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>
- Restart H-Sphere.
|