|
In H-Sphere 2.5 and up Apache software is installed from a separate hsphere-apache package. Before, it was installed from
hsphere-apache-webbox package which used to include both Apache and PHP, PHP being enabled as DSO modules. Now PHP also comes in
sepate hsphere-php packages of 4 and 5 versions.
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:
/hsphere/local/config/httpd/custom.conf
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:
- {domain.name}.transferlog.conf - config file for transfer log rotation for a domain
- {domain.name}.errorlog.conf - config file for error log rotation for a domain
- {domain.name}.agentlog.conf - config file for agent log rotation for a domain
- {domain.name}.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/{domain.name}/ 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:
/hsphere/shared/scripts/apache-reconfig
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.
|