|
Control Panel (CP) is the H-Sphere logical representation for managing servers and hosting resources via web interface. It is implemented as a Java servlet that runs on its own Apache server. CP is a separate logical server and is included in every H-Sphere configuration. This document covers the following Control Panel issues: - Installed Software
- Interaction Between Servers
- Location of CP Files And Directories
- The H-Sphere Configuration File (hsphere.properties)
- Control Panel Apache Server Configuration
- CP Back-End Servlet Engine:
- JServ Configuration (before v.2.4)
- Tomcat Configuration (v.2.4 and up)
- Reseller Configuration
• Reseller SSL - CP SSL Configuration
- CP Apache Log Files
- CP Traffic Calculation
- The H-Sphere System Database
• The System Database Settings • Logging Into the System Database • VACUUM Utility - CP Mail Queue (v.2.4 and up)
Installed Software- Apache server v.1.3.31
- SSL support: OpenSSL v.0.9.7c
- CP back-end servlet engine:
- before v.2.4 -- Apache JServ: jdk 1.3.x + jsdk2-2.0 - v.2.4 betas 1-3 -- Jakarta Tomcat: jdk 1.4.x + jsdk2-2.0 + tomcat 4.1.x - v.2.4 beta 4 and up -- Jakarta Tomcat: jdk 1.4.x + jsdk2-2.0 + tomcat 5.1.x - System database: PostgreSQL server v.7.1.3 or higher
- Additional packages:
- SiteStudio v.1.6 - H-Sphere package that enables end users building their own sites even without basic web design knowledge. - XFree86-Xvfb-4.x.x - package used by SiteStudio ImageMaker for image generation. Interaction Between ServersServers in H-Sphere clusters communicate only through the Control Panel. There is no way for servers like web and DNS exchange commands directly. To communicate with Linux/Unix servers, CP uses Shell or Perl scripts via SSH protocol (port 22) as the cpanel user. Communication between the CP and Windows servers is performed through the SOAP protocol (port 10125), which allows for cross-platform exchange of data in XML documents via HTTP. In versions before 2.4, CP communicated with Winboxes through direct HTTP requests (port 80), which were handled by ASP scripts. Location Of CP Files And DirectoriesBy default, the cpanel user home directory is /hsphere/local/home/cpanel. There you will find the following files and directories:
apache - CP Apache installation apache/etc - CP Apache configuration apache/etc/httpd.conf - CP Apache configuration file shiva - H-Sphere related binary and config files shiva/psoft_config - H-Sphere config files shiva/psoft_config/hsphere.properties - H-Sphere config file shiva/psoft_config/HS_VERSION - file that contains version number of H-Sphere shiva/shiva-templates - H-Sphere templates location, DocumentRoot for Apache server. shiva/shiva-templates/index.html - Redirect to control panel; served when the http://cp.domain.com:8080/ CP URL is accessed
/hsphere/shared/SiteStudio/psoft_config/masonry.properties - SiteStudio config file (could be on a different server) IMPORTANT: To make changes in these files, log into the CP server as the cpanel user. The H-Sphere Configuration File (hsphere.properties)The H-Sphere configuration file should be located at ~cpanel/shiva/psoft_config/hsphere.properties 1) CP URL configuration - URL by which H-Sphere is called: CP_HOST = cp.domain.com -- host name CP_PORT = 8443 -- port CP_PROTOCOL=https:// -- protocol CP_URI = /psoft/servlet/psoft.hsphere.CP Notes: - This is not the only place where those settings have to be altered. - URI cannot be changed here at the moment. - Make sure that DNS is properly configured if you want to change domain. - Make sure to alter apache if you want to change domain and port. 2) Database settings (see the system dababase settings below) 3) Log file: log4j.appender.A1.File=/var/log/hsphere/hsphere.log - location of the log file. Control Panel Apache Server ConfigurationCP Apache home directory is /hsphere/local/home/cpanel/apache. All CP Apache server configurations are placed into the etc/jserv subdirectory of the Apache home directory: /hsphere/local/home/cpanel/apache/etc/jserv. This directory also has its symlink: /hsphere/local/home/cpanel/apache/conf. Control Panel Back-End Servlet EngineBefore version 2.4, Control Panel's back-end servlet container was Apache JServ. Starting from version 2.4, CP server uses Jakarta Tomcat servlet engine and is automatically installed with Tomcat embedded.
JServ Configuration(outdated since v.2.4) /hsphere/local/home/cpanel/apache/etc/jserv - JServ configuration directory. In this directory: - jserv.conf - JServ configuration
- jserv.properties - JServ properties
- zone.properties - JServ zone file
Tomcat Configuration(v.2.4 and up) Starting with H-Sphere 2.4, Control Panel runs on Tomcat Apache servlet engine. Read about Tomcat configuration in a separate document. Reseller Configuration/hsphere/local/home/cpanel/apache/etc/sites/ contains resellers' SSL and virtual host configuration. - /hsphere/local/home/cpanel/apache/etc/{reseller_main_account_name}.conf - reseller Apache virtual host configuration file
- /hsphere/local/home/cpanel/apache/etc/{reseller_main_account_name}/ - reseller SSL directory.
Reseller SSL ConfigurationIf SSL is enabled for reseller, the following files are placed into the reseller SSL directory: - server.crt - reseller SSL certificate
- server.key - reseller SSL private key
CP SSL ConfigurationIn the /hsphere/local/home/cpanel/apache CP Apache home directory: - etc/ssl.crt/server.crt - file with server SSL certificates.
- etc/ssl.csr/server.csr - file with SSL signing request.
- etc/ssl.key/server.key - file with SSL/RSA private key.
CP Apache Log FilesLog files are located in the /hsphere/local/home/cpanel/apache/logs directory. CP Traffic CalculationTraffic generated from browsing the Control Panel is not included in the summary traffic. To track it, H-Sphere owners can set up custom packages. The H-Sphere System DatabaseThe H-Sphere system database is used to store system data. In normal H-Sphere configuration, it runs on PostgreSQL server, but it may be installed on a separate Windows-based MSSQL server. Henceforth we will talk about the system database on PostgreSQL, unless noted otherwise. Usually, the system database is located on the same server with the Control Panel. The system database is not used for hosting. PostgreSQL hosting server could not be installed on the same box with the system database. The H-Sphere database is executed under the pgsql or postgres user. The System Database SettingsDatabase settings in hsphere.properties (this should be enough to connect to db):
DB_DRIVER = org.postgresql.Driver DB_URL = jdbc:postgresql://127.0.0.1/hsphere - the system database name, usually hsphere DB_USER = wwwuser - the system db user name, usually wwwuser DB_PASSWORD = your_db_password - the system db user password DB_NEWID = SELECT nextval(''{0}'') Logging Into The System DatabaseTo log into the system database: - Login as the cpanel user to the server where the system database is located (usually, CP server).
- Enter the hsphere database (usually, under the wwwuser user name):
# psql hsphere [user_name]
See also the instructions on: - restarting the system database;
- backing up the system database;
- upgrading the system PostgreSQL;
- the system database optimization;
- PostgreSQL localization (choosing the language for PostgreSQL)
VACUUM UtilityThe Postgres VACUUM instruction allows cleaning up the server transactions. Enter the psql server: # psql hsphere wwwuser and type in the password set in hsphere.properties. In the psql command line, type the 'vacuum full' command: vacuum full; The command may vary in different versions of Postgres. Note: vacuum is a time-consuming procedure; it may take up to several hours to complete! CP Mail Queue(v.2.4 and up) The mail queue file is assigned to store unsent CP messages (e.g., trouble tickets, system notifications, mass mail, etc.) when CP is restarted - formerly, they were lost after CP restart. Mail queue location is set in hsphere.properties: MAIL_SWP=/hsphere/local/home/cpanel/shiva/mail.swp
|