Class: PhusionPassenger::PlatformInfo::ApacheDetector::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/phusion_passenger/platform_info/apache_detector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(detector) ⇒ Result

Returns a new instance of Result.



49
50
51
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 49

def initialize(detector)
	@detector = detector
end

Instance Attribute Details

#a2dismodObject

These are optional and may be nil.



45
46
47
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 45

def a2dismod
  @a2dismod
end

#a2enmodObject

These are optional and may be nil.



45
46
47
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 45

def a2enmod
  @a2enmod
end

#apxs2Object

These are required and are never nil.



43
44
45
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 43

def apxs2
  @apxs2
end

#config_fileObject

These are required and are never nil.



43
44
45
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 43

def config_file
  @config_file
end

#ctlObject

These are required and are never nil.



43
44
45
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 43

def ctl
  @ctl
end

#error_logObject

This may be nil. It depends on how well we can infer information from the config file.



47
48
49
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 47

def error_log
  @error_log
end

#httpdObject

These are required and are never nil.



43
44
45
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 43

def httpd
  @httpd
end

#versionObject

These are required and are never nil.



43
44
45
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 43

def version
  @version
end

Instance Method Details

#reportObject



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/phusion_passenger/platform_info/apache_detector.rb', line 53

def report
	log " <b>* Found Apache #{version}!</b>"
	log "   Information:"
	log "      apxs2          : #{apxs2}"
	log "      Main executable: #{httpd}"
	log "      Control command: #{ctl}"
	log "      Config file    : #{config_file}"
	log "      Error log file : #{error_log}"
	log ""
	log "   To install Phusion Passenger against this specific Apache version:"
	log "      #{PlatformInfo.ruby_command} #{PhusionPassenger.bin_dir}/passenger-install-apache2-module --apxs2-path='#{apxs2}'"
	log ""
	log "   To start, stop or restart this specific Apache version:"
	log "      #{ctl} start"
	log "      #{ctl} stop"
	log "      #{ctl} restart"
	log ""
	log "   To troubleshoot, please read the logs in this file:"
	log "      #{error_log}"
	log ""
end