You are here

class hostingService_http_apache in Hosting 7.3

Same name and namespace in other branches
  1. 6.2 web_server/hosting_web_server.service.inc \hostingService_http_apache
  2. 7.4 web_server/hosting_web_server.service.inc \hostingService_http_apache

Hierarchy

Expanded class hierarchy of hostingService_http_apache

File

web_server/hosting_web_server.service.inc, line 29
Hosting service classes for the Hosting web server module.osting service classes for the Hosting web server module.

View source
class hostingService_http_apache extends hostingService_http_public {
  public $type = 'apache';
  public $name = 'Apache';
  protected $has_restart_cmd = TRUE;
  function default_restart_cmd() {
    $command = '/usr/sbin/apache2ctl';

    # a proper default for most of the world
    if (isset($_SERVER['PATH'])) {
      foreach (explode(':', $_SERVER['PATH']) as $path) {
        $options[] = "{$path}/apache2ctl";
        $options[] = "{$path}/apachectl";
      }
    }

    # try to detect the apache restart command
    $options[] = '/usr/local/sbin/apachectl';

    # freebsd
    $options[] = '/usr/sbin/apache2ctl';

    # debian + apache2
    $options[] = $command;
    foreach ($options as $test) {
      if (is_executable($test)) {
        $command = $test;
        break;
      }
    }
    return "sudo {$command} graceful";
  }

}

Members

Namesort descending Modifiers Type Description Overrides
hostingService::$available public property
hostingService::$server public property
hostingService::$server_node public property
hostingService::context_import public function 3
hostingService::delete public function 5
hostingService::delete_revision public function 5
hostingService::form public function 5
hostingService::getName public function Returns human readable name for this service.
hostingService::has_port public function 3
hostingService::has_restart_cmd public function 5
hostingService::insert public function 5
hostingService::load public function 5
hostingService::mergeData protected function
hostingService::save public function
hostingService::setValues public function
hostingService::validate public function 2
hostingService::view public function 5
hostingService::__construct function
hostingService_http::$service public property Overrides hostingService::$service
hostingService_http::$ssl_enabled public property
hostingService_http_apache::$has_restart_cmd protected property Overrides hostingService::$has_restart_cmd
hostingService_http_apache::$name public property Overrides hostingService::$name
hostingService_http_apache::$type public property Overrides hostingService::$type
hostingService_http_apache::default_restart_cmd function Overrides hostingService::default_restart_cmd
hostingService_http_public::$has_port protected property Overrides hostingService::$has_port
hostingService_http_public::context_options public function Overrides hostingService::context_options 1
hostingService_http_public::default_port function Overrides hostingService::default_port
hostingService_http_public::update function Overrides hostingService::update