Search Engine: Elastic

Article ID: 3182, created on Nov 30, 2007, last review on May 10, 2014

  • Applies to:
  • H-Sphere



Apache Modules in 2.5

Core of hsphere-apache contains only two modules now: http_core.c and mod_so.c. The rest are compiled as DSO, and their list can be obtained by running:

ls /hsphere/shared/apache/libexec/
These DSO modules are enabled through the apache configuration file. When you update from 2.4 to 2.5 version, the system checks the old http.conf and enables the lacking *.so modules.


Configuration Directory and File

Apache configuration directory is /hsphere/local/config/httpd. Also, a symlink alias to this directory is generated in the Apache home directory, that is, /hsphere/shared/apache/conf.

/hsphere/local/config/httpd/httpd.conf - Apache configuration file.


Custom Configuration File

Starting with 2.5 version, custom configuration file is included in which you can specify your custom apache settings:


System Virtual Hosts Config

File /hsphere/local/config/httpd/namevh.conf contains list of all system (not user!) virtual hosts.


Virtual Hosts (Logical Servers) Configs

For each logical server a virtual host is created and their configuration files are placed to /hsphere/local/config/httpd/conf/lservers directory: e.g. mail.conf, mrtg.conf, mysql.conf. Before, when accessing the box by its logical name it was possible to view, for instance, sources of phpMyAdmin. Now with each logical name having its own virtual host such a possibility is eliminated.


User Virtual Hosts

Config files for user virtual hosts are placed to /hsphere/local/config/httpd/sites/ directory.


Log Rotate Config File

/hsphere/local/config/httpd/rotatelog.cfg - log rotate config file which includes all log confs located in the /hsphere/local/config/httpd/logrotate_conf/ directory:

  • {}.transferlog.conf - config file for transfer log rotation for a domain
  • {}.errorlog.conf - config file for error log rotation for a domain
  • {}.agentlog.conf - config file for agent log rotation for a domain
  • {}.referrerlog.conf - config file for referrer log rotation for a domain


Apache Logs and Web Traffic Calculation in H-Sphere

Apache logs are located in the /hsphere/local/var/httpd/logs/ directory. Also, each hosted Web domain has its own logs in the /hsphere/local/home/{user}/logs/{}/ directory (see Web traffic calculation).

There are two types of Web traffic calculation in H-Sphere:

Please refer to a separate document on Web traffic calculation and log rotation in H-Sphere for version 2.5 and up and for versions before 2.5.


Script Restarting Apache

The following script is used to restart Apache:


Running the script can give large number of warnings. Most of them mean that user created subdomain through control panel, and then manually deleted the related directory. This will not prevent apache from starting or from normal operation.


Apache suexec

H-Sphere WebBox apache suexec is configured to run users' CGI scripts only within the /hsphere/local/home/ directory, recursively. Thus, a user may run his/her own cgi scripts only if he/she has fourth nesting level within the H-Sphere user home directory, for example, /hsphere/local/home/user_home1.

f213b9fa8759d57bee5d547445806fe7 3ef1f5f998c0dc182718a7fe4376f875

Email subscription for changes to this article
Save as PDF