.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "App::Info::HTTPD::Apache 3pm" .TH App::Info::HTTPD::Apache 3pm "2020-01-23" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" App::Info::HTTPD::Apache \- Information about Apache web server .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use App::Info::HTTPD::Apache; \& \& my $apache = App::Info::HTTPD::Apache\->new; \& \& if ($apache\->installed) { \& print "App name: ", $apache\->name, "\en"; \& print "Version: ", $apache\->version, "\en"; \& print "Bin dir: ", $apache\->bin_dir, "\en"; \& } else { \& print "Apache is not installed. :\-(\en"; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" App::Info::HTTPD::Apache supplies information about the Apache web server installed on the local system. It implements all of the methods defined by App::Info::HTTPD. Methods that trigger events will trigger them only the first time they're called (See App::Info for documentation on handling events). To start over (after, say, someone has installed Apache) construct a new App::Info::HTTPD::Apache object to aggregate new meta data. .PP Some of the methods trigger the same events. This is due to cross-calling of methods or of functions common to methods. However, any one event should be triggered no more than once. For example, although the info event \*(L"Executing `httpd \-v`\*(R" is documented for the methods \f(CW\*(C`name()\*(C'\fR, \f(CW\*(C`version()\*(C'\fR, \&\f(CW\*(C`major_version()\*(C'\fR, \f(CW\*(C`minor_version()\*(C'\fR, and \f(CW\*(C`patch_version()\*(C'\fR, rest assured that it will only be triggered once, by whichever of those four methods is called first. .SH "INTERFACE" .IX Header "INTERFACE" .SS "Constructor" .IX Subsection "Constructor" \fInew\fR .IX Subsection "new" .PP .Vb 1 \& my $apache = App::Info::HTTPD::Apache\->new(@params); .Ve .PP Returns an App::Info::HTTPD::Apache object. See App::Info for a complete description of argument parameters. .PP When called, \f(CW\*(C`new()\*(C'\fR searches the the directories returned by \&\f(CW\*(C`search_bin_dirs()\*(C'\fR for an executable with a name returned by \&\f(CW\*(C`search_exe_names()\*(C'\fR. If found, the executable (hereafter referred to as \&\fIhttpd\fR, regardless of how it was actually found to be named) will be called by the object methods below to gather the data necessary for each. If \fIhttpd\fR cannot be found, then Apache is assumed not to be installed, and each of the object methods will return \f(CW\*(C`undef\*(C'\fR. .PP In addition to the parameters supported by the parent classes, App::Info and App::Info::HTTPD, this class' \f(CW\*(C`new()\*(C'\fR method also supports: .IP "search_conf_names" 4 .IX Item "search_conf_names" An array reference of possible names for Apache configuration files. These will be returned by the \f(CW\*(C`search_conf_names()\*(C'\fR method before the default names, and may be used by \f(CW\*(C`conf_file()\*(C'\fR to search for the configuration file. .IP "search_conf_dirs" 4 .IX Item "search_conf_dirs" An array reference of possible directories in which to search for Apache configuration files. These will be returned by the \f(CW\*(C`search_conf_dirs()\*(C'\fR method before the default directories, and may be used by \f(CW\*(C`conf_file()\*(C'\fR to search for the configuration file. .PP As well as these parameters to specify alternate names for Apache executables (other than \fIhttpd\fR, which you specify via the \f(CW\*(C`search_exe_names\*(C'\fR parameter): .IP "search_ab_names" 4 .IX Item "search_ab_names" .PD 0 .IP "search_apachectl_names" 4 .IX Item "search_apachectl_names" .IP "search_apxs_names" 4 .IX Item "search_apxs_names" .IP "search_htdigest_names" 4 .IX Item "search_htdigest_names" .IP "search_htpasswd_names" 4 .IX Item "search_htpasswd_names" .IP "search_logresolve_names" 4 .IX Item "search_logresolve_names" .IP "search_rotatelogs_names" 4 .IX Item "search_rotatelogs_names" .PD .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Looking for Apache executable .IP "confirm" 4 .IX Item "confirm" Path to your httpd executable? .IP "unknown" 4 .IX Item "unknown" Path to your httpd executable? .SS "Class Method" .IX Subsection "Class Method" \fIkey_name\fR .IX Subsection "key_name" .PP .Vb 1 \& my $key_name = App::Info::HTTPD::Apache\->key_name; .Ve .PP Returns the unique key name that describes this class. The value returned is the string \*(L"Apache\*(R". .SS "Object Methods" .IX Subsection "Object Methods" \fIinstalled\fR .IX Subsection "installed" .PP .Vb 2 \& print "apache is ", ($apache\->installed ? \*(Aq\*(Aq : \*(Aqnot \*(Aq), \& "installed.\en"; .Ve .PP Returns true if Apache is installed, and false if it is not. App::Info::HTTPD::Apache determines whether Apache is installed based on the presence or absence of the \fIhttpd\fR application on the file system, as found when \f(CW\*(C`new()\*(C'\fR constructed the object. If Apache does not appear to be installed, then all of the other object methods will return empty values. .PP \fIname\fR .IX Subsection "name" .PP .Vb 1 \& my $name = $apache\->name; .Ve .PP Returns the name of the application. App::Info::HTTPD::Apache parses the name from the system call \f(CW\*(C`\`httpd \-v\`\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-v` .IP "error" 4 .IX Item "error" Failed to find Apache version data with `httpd \-v` .Sp Failed to parse Apache name and version from string .IP "unknown" 4 .IX Item "unknown" Enter a valid Apache name .PP \fIversion\fR .IX Subsection "version" .PP .Vb 1 \& my $version = $apache\->version; .Ve .PP Returns the apache version number. App::Info::HTTPD::Apache parses the version number from the system call \f(CW\*(C`\`httpd \-v\`\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-v` .IP "error" 4 .IX Item "error" Failed to find Apache version data with `httpd \-v` .Sp Failed to parse Apache name and version from string .IP "unknown" 4 .IX Item "unknown" Enter a valid Apache version number .PP \fImajor_version\fR .IX Subsection "major_version" .PP .Vb 1 \& my $major_version = $apache\->major_version; .Ve .PP Returns the Apache major version number. App::Info::HTTPD::Apache parses the version number from the system call \f(CW\*(C`\`httpd \-\-v\`\*(C'\fR. For example, if \&\f(CW\*(C`version()\*(C'\fR returns \*(L"1.3.24\*(R", then this method returns \*(L"1\*(R". .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-v` .IP "error" 4 .IX Item "error" Failed to find Apache version data with `httpd \-v` .Sp Failed to parse Apache name and version from string .IP "unknown" 4 .IX Item "unknown" Enter a valid Apache major version number .PP \fIminor_version\fR .IX Subsection "minor_version" .PP .Vb 1 \& my $minor_version = $apache\->minor_version; .Ve .PP Returns the Apache minor version number. App::Info::HTTPD::Apache parses the version number from the system call \f(CW\*(C`\`httpd \-\-v\`\*(C'\fR. For example, if \&\f(CW\*(C`version()\*(C'\fR returns \*(L"1.3.24\*(R", then this method returns \*(L"3\*(R". See the version method for a list of possible errors. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-v` .IP "error" 4 .IX Item "error" Failed to find Apache version data with `httpd \-v` .Sp Failed to parse Apache name and version from string .IP "unknown" 4 .IX Item "unknown" Enter a valid Apache minor version number .PP \fIpatch_version\fR .IX Subsection "patch_version" .PP .Vb 1 \& my $patch_version = $apache\->patch_version; .Ve .PP Returns the Apache patch version number. App::Info::HTTPD::Apache parses the version number from the system call \f(CW\*(C`\`httpd \-\-v\`\*(C'\fR. For example, if \&\f(CW\*(C`version()\*(C'\fR returns \*(L"1.3.24\*(R", then this method returns \*(L"24\*(R". .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-v` .IP "error" 4 .IX Item "error" Failed to find Apache version data with `httpd \-v` .Sp Failed to parse Apache name and version from string .IP "unknown" 4 .IX Item "unknown" Enter a valid Apache patch version number .PP \fIhttpd_root\fR .IX Subsection "httpd_root" .PP .Vb 1 \& my $httpd_root = $apache\->httpd_root; .Ve .PP Returns the \s-1HTTPD\s0 root directory path. This path is defined at compile time, and App::Info::HTTPD::Apache parses it from the system call \f(CW\*(C`\`httpd \-V\`\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-V` .IP "error" 4 .IX Item "error" Unable to extract compile settings from `httpd \-V` .Sp Cannot parse \s-1HTTPD\s0 root from `httpd \-V` .IP "unknown" 4 .IX Item "unknown" Enter a valid \s-1HTTPD\s0 root .PP \fImagic_number\fR .IX Subsection "magic_number" .PP .Vb 1 \& my $magic_number = $apache\->magic_number; .Ve .PP Returns the \*(L"Magic Number\*(R" for the Apache installation. This number is defined at compile time, and App::Info::HTTPD::Apache parses it from the system call \&\f(CW\*(C`\`httpd \-V\`\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-V` .IP "error" 4 .IX Item "error" Unable to extract compile settings from `httpd \-V` .Sp Cannot parse \s-1HTTPD\s0 root from `httpd \-V` .IP "unknown" 4 .IX Item "unknown" Enter a valid magic number .PP \fIcompile_option\fR .IX Subsection "compile_option" .PP .Vb 1 \& my $compile_option = $apache\->compile_option($option); .Ve .PP Returns the value of the Apache compile option \f(CW$option\fR. The compile option is looked up case-insensitively. All of the Apache compile options are collected from the system call \f(CW\*(C`\`httpd \-V\`\*(C'\fR. For compile options that contain a corresponding value (such as \*(L"\s-1SUEXEC_BIN\*(R"\s0 or \*(L"\s-1DEFAULT_PIDLOG\*(R"\s0), \&\f(CW\*(C`compile_option()\*(C'\fR returns the value of the option if the option exists. For other options, it returns true (1) if the option was included, and false(\f(CW\*(C`undef\*(C'\fR) if it was not. Returns \f(CW\*(C`undef\*(C'\fR if Apache is not installed or if the option could not be parsed. See the httpd_root method for a list of possible errors. .PP See the Apache documentation at to learn about all the possible compile options. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-V` .IP "error" 4 .IX Item "error" Unable to extract compile settings from `httpd \-V` .Sp Cannot parse \s-1HTTPD\s0 root from `httpd \-V` .IP "unknown" 4 .IX Item "unknown" Enter a valid option .PP \fIconf_file\fR .IX Subsection "conf_file" .PP Returns the full path to the Apache configuration file. \f(CW\*(C`conf_file()\*(C'\fR looks for the configuration file in a number of locations and under a number of names. First it tries to use the file specified by the \f(CW\*(C`SERVER_CONFIG_FILE\*(C'\fR compile option (as returned by a call to \f(CW\*(C`compile_option()\*(C'\fR) \*(-- and if it's a relative file name, it gets appended to the directory returned by \&\f(CW\*(C`httpd_root()\*(C'\fR. If that file isn't found, \f(CW\*(C`conf_file()\*(C'\fR then looks for a file with one of the names returned by \f(CW\*(C`search_conf_names()\*(C'\fR in the \fIconf\fR subdirectory of the \s-1HTTPD\s0 root directory. Failing that, it searches for them in each of the directories returned by \f(CW\*(C`search_conf_dirs()\*(C'\fR until it finds a match. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Apache configuration file .IP "error" 4 .IX Item "error" No Apache config file found .IP "unknown" 4 .IX Item "unknown" Location of httpd.conf file? .PP \fIuser\fR .IX Subsection "user" .PP .Vb 1 \& my $user = $apache\->user; .Ve .PP Returns the name of the Apache user. This value is collected from the Apache configuration file as returned by \f(CW\*(C`conf_file()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Apache configuration file .Sp Executing `httpd \-V` .Sp Parsing Apache configuration file .IP "error" 4 .IX Item "error" No Apache config file found .Sp Cannot parse user from file .Sp Cannot parse group from file .Sp Cannot parse port from file .Sp Cannot parse DocumentRoot from file .IP "unknown" 4 .IX Item "unknown" Location of httpd.conf file? .Sp Enter Apache user name .PP \fIgroup\fR .IX Subsection "group" .PP Returns the name of the Apache user group. This value is collected from the Apache configuration file as returned by \f(CW\*(C`conf_file()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Apache configuration file .Sp Executing `httpd \-V` .Sp Parsing Apache configuration file .IP "error" 4 .IX Item "error" No Apache config file found .Sp Cannot parse user from file .Sp Cannot parse group from file .Sp Cannot parse port from file .Sp Cannot parse DocumentRoot from file .IP "unknown" 4 .IX Item "unknown" Location of httpd.conf file? .Sp Enter Apache user group name .PP \fIport\fR .IX Subsection "port" .PP Returns the port number on which Apache listens. This value is collected from Apache configuration file as returned by \f(CW\*(C`conf_file()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Apache configuration file .Sp Executing `httpd \-V` .Sp Parsing Apache configuration file .IP "error" 4 .IX Item "error" No Apache config file found .Sp Cannot parse user from file .Sp Cannot parse group from file .Sp Cannot parse port from file .Sp Cannot parse DocumentRoot from file .IP "unknown" 4 .IX Item "unknown" Location of httpd.conf file? .Sp Enter Apache \s-1TCP/IP\s0 port number .PP \fIdoc_root\fR .IX Subsection "doc_root" .PP Returns the local physical path where web pages are stored. This value is collected from Apache configuration file as returned by \f(CW\*(C`conf_file()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Apache configuration file .Sp Executing `httpd \-V` .Sp Parsing Apache configuration file .IP "error" 4 .IX Item "error" No Apache config file found .Sp Cannot parse user from file .Sp Cannot parse group from file .Sp Cannot parse port from file .Sp Cannot parse DocumentRoot from file .IP "unknown" 4 .IX Item "unknown" Location of httpd.conf file? .Sp Enter DocumentRoot actual directory .PP \fIcgibin_virtual\fR .IX Subsection "cgibin_virtual" .PP Returns the virtual path where cgi-bin programs are stored. This value is collected from Apache configuration file as returned by \f(CW\*(C`conf_file()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Apache configuration file .Sp Executing `httpd \-V` .Sp Parsing Apache configuration file .IP "error" 4 .IX Item "error" No Apache config file found .Sp Cannot parse user from file .Sp Cannot parse group from file .Sp Cannot parse port from file .Sp Cannot parse ScriptAlias from file .IP "unknown" 4 .IX Item "unknown" Location of httpd.conf file? .Sp Enter ScriptAlias virtual directory .PP \fIcgibin_physical\fR .IX Subsection "cgibin_physical" .PP Returns the physical path where cgi-bin programs are stored. This value is collected from Apache configuration file as returned by \f(CW\*(C`conf_file()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Apache configuration file .Sp Executing `httpd \-V` .Sp Parsing Apache configuration file .IP "error" 4 .IX Item "error" No Apache config file found .Sp Cannot parse user from file .Sp Cannot parse group from file .Sp Cannot parse port from file .Sp Cannot parse ScriptAlias from file .IP "unknown" 4 .IX Item "unknown" Location of httpd.conf file? .Sp Enter ScriptAlias physical directory .PP \fIexecutable\fR .IX Subsection "executable" .PP .Vb 1 \& my $executable = $apache\->executable; .Ve .PP Returns the path to the Apache executable, which will be defined by one of the names returned by \f(CW\*(C`search_exe_names()\*(C'\fR. The executable is searched for in \&\f(CW\*(C`new()\*(C'\fR, so there are no events for this method. .PP \fIhttpd\fR .IX Subsection "httpd" .PP .Vb 1 \& my $httpd = $apache\->httpd; .Ve .PP An alias for \f(CW\*(C`executable()\*(C'\fR. .PP \fIbin_dir\fR .IX Subsection "bin_dir" .PP .Vb 1 \& my $bin_dir = $apache\->bin_dir; .Ve .PP Returns the SQLite binary directory path. App::Info::HTTPD::Apache simply retrieves it as the directory part of the path to the \s-1HTTPD\s0 executable. .PP \fIinc_dir\fR .IX Subsection "inc_dir" .PP .Vb 1 \& my $inc_dir = $apache\->inc_dir; .Ve .PP Returns the Apache include directory path. App::Info::HTTPD::Apache simply looks for the \fIinclude\fR or \fIinc\fR directory under the \fIhttpd_root\fR directory, as returned by \f(CW\*(C`httpd_root()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-V` .Sp Searching for include directory .IP "error" 4 .IX Item "error" Unable to extract compile settings from `httpd \-V` .Sp Cannot parse \s-1HTTPD\s0 root from `httpd \-V` .Sp Cannot find include directory .IP "unknown" 4 .IX Item "unknown" Enter a valid \s-1HTTPD\s0 root .Sp Enter a valid Apache include directory .PP \fIlib_dir\fR .IX Subsection "lib_dir" .PP .Vb 1 \& my $lib_dir = $apache\->lib_dir; .Ve .PP Returns the Apache library directory path. App::Info::HTTPD::Apache simply looks for the \fIlib\fR, \fImodules\fR, or \fIlibexec\fR directory under the \s-1HTTPD\s0 root> directory, as returned by \f(CW\*(C`httpd_root()\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-V` .Sp Searching for library directory .IP "error" 4 .IX Item "error" Unable to extract compile settings from `httpd \-V` .Sp Cannot parse \s-1HTTPD\s0 root from `httpd \-V` .Sp Cannot find library directory .IP "unknown" 4 .IX Item "unknown" Enter a valid \s-1HTTPD\s0 root .Sp Enter a valid Apache library directory .PP \fIso_lib_dir\fR .IX Subsection "so_lib_dir" .PP .Vb 1 \& my $so_lib_dir = $apache\->so_lib_dir; .Ve .PP Returns the Apache shared object library directory path. Currently, this directory is assumed to be the same as the lib directory, so this method is simply an alias for \f(CW\*(C`lib_dir\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-V` .Sp Searching for library directory .IP "error" 4 .IX Item "error" Unable to extract compile settings from `httpd \-V` .Sp Cannot parse \s-1HTTPD\s0 root from `httpd \-V` .Sp Cannot find library directory .IP "unknown" 4 .IX Item "unknown" Enter a valid \s-1HTTPD\s0 root .Sp Enter a valid Apache library directory .PP \fIstatic_mods\fR .IX Subsection "static_mods" .PP Returns a list (in an array context) or an anonymous array (in a scalar context) of all of the modules statically compiled into Apache. These are collected from the system call \f(CW\*(C`\`httpd \-l\`\*(C'\fR. If Apache is not installed, \&\f(CW\*(C`static_mods()\*(C'\fR returns an empty list in an array context or an empty anonymous array in a scalar context. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-l` .IP "error" 4 .IX Item "error" Unable to extract needed data from `httpd \-l` .PP \fIshared_mods\fR .IX Subsection "shared_mods" .PP Returns a list (in an array context) or an anonymous array (in a scalar context) of all of the shared modules compiled for Apache. These are collected by searching for all files ending in \fI.so\fR in the directory returned from the system call \f(CW\*(C`\`apxs \-q LIBEXECDIR\`\*(C'\fR. If Apache is not installed, \&\f(CW\*(C`shared_mods()\*(C'\fR returns an empty list in an array context or an empty anonymous array in a scalar context. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Looking for apxs .Sp Executing `apxs \-q LIBEXECDIR` .IP "error" 4 .IX Item "error" Unable to extract module directory name from `apxs \-q LIBEXECDIR` .PP \fImod_so\fR .IX Subsection "mod_so" .PP Boolean method that returns true when mod_so has been compiled into Apache, and false if it has not. The presence or absence of mod_so is determined by the system call \f(CW\*(C`\`httpd \-l\`\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-l` .IP "error" 4 .IX Item "error" Unable to extract needed data from `httpd \-l` .PP \fImod_perl\fR .IX Subsection "mod_perl" .PP Boolean method that returns true when mod_perl has been statically compiled into Apache, and false if it has not. The presence or absence of mod_perl is determined by the system call \f(CW\*(C`\`httpd \-l\`\*(C'\fR or, for a dynamic mod_perl, by the contents of the directory returned by the system call \f(CW\*(C`\`apxs \-q LIBEXECDIR\`\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Executing `httpd \-l` .Sp Looking for apxs .Sp Executing `apxs \-q LIBEXECDIR` .IP "error" 4 .IX Item "error" Unable to extract needed data from `httpd \-l` .PP \fIhome_url\fR .IX Subsection "home_url" .PP .Vb 1 \& my $home_url = $apache\->home_url; .Ve .PP Returns the Apache home page \s-1URL.\s0 .PP \fIdownload_url\fR .IX Subsection "download_url" .PP .Vb 1 \& my $download_url = $apache\->download_url; .Ve .PP Returns the Apache download \s-1URL.\s0 .PP \fIsearch_exe_names\fR .IX Subsection "search_exe_names" .PP .Vb 1 \& my @search_exe_names = $apache\->search_exe_names; .Ve .PP Returns a list of possible names for the Apache executable; \fI.exe\fR is appended to each on Win32. By default, the names are: .IP "httpd" 4 .IX Item "httpd" .PD 0 .IP "httpd2" 4 .IX Item "httpd2" .IP "apache-perl" 4 .IX Item "apache-perl" .IP "apache" 4 .IX Item "apache" .IP "apache2" 4 .IX Item "apache2" .PD .PP \fIsearch_bin_dirs\fR .IX Subsection "search_bin_dirs" .PP .Vb 1 \& my @search_bin_dirs = $apache\->search_bin_dirs; .Ve .PP Returns a list of possible directories in which to search an executable. Used by the \f(CW\*(C`new()\*(C'\fR constructor to find an executable to execute and collect application info. The found directory will also be returned by the \f(CW\*(C`bin_dir\*(C'\fR method. .PP The list of directories by default consists of the path as defined by \f(CW\*(C`File::Spec\->path\*(C'\fR and the value returned by \&\f(CW\*(C`Apache2::BuildConfig\->new\->{APXS_BINDIR}\*(C'\fR (if Apache2::BuildConfig is installed), as well as the following directories: .IP "/usr/local/apache/bin" 4 .IX Item "/usr/local/apache/bin" .PD 0 .IP "/usr/local/apache2/bin" 4 .IX Item "/usr/local/apache2/bin" .IP "/opt/apache/bin" 4 .IX Item "/opt/apache/bin" .IP "/opt/apache2/bin" 4 .IX Item "/opt/apache2/bin" .IP "/usr/local/bin" 4 .IX Item "/usr/local/bin" .IP "/usr/local/sbin" 4 .IX Item "/usr/local/sbin" .IP "/usr/bin" 4 .IX Item "/usr/bin" .IP "/usr/sbin" 4 .IX Item "/usr/sbin" .IP "/bin" 4 .IX Item "/bin" .IP "/etc/httpd/bin" 4 .IX Item "/etc/httpd/bin" .IP "/etc/apache/bin" 4 .IX Item "/etc/apache/bin" .IP "/etc/apache2/bin" 4 .IX Item "/etc/apache2/bin" .IP "/home/httpd/bin" 4 .IX Item "/home/httpd/bin" .IP "/home/apache/bin" 4 .IX Item "/home/apache/bin" .IP "/home/apache2/bin" 4 .IX Item "/home/apache2/bin" .IP "/sw/bin" 4 .IX Item "/sw/bin" .IP "/sw/sbin" 4 .IX Item "/sw/sbin" .IP "/web/httpd" 4 .IX Item "/web/httpd" .PD .PP \fIsearch_lib_dirs\fR .IX Subsection "search_lib_dirs" .PP .Vb 1 \& my @search_lib_dirs = $apache\->search_lib_dirs; .Ve .PP Returns a list of possible directories in which to search for Apache libraries. By default, it returns this list of directories, each appended to the name of the directory returned by \f(CW\*(C`httpd_root()\*(C'\fR: .IP "lib" 4 .IX Item "lib" .PD 0 .IP "modules" 4 .IX Item "modules" .IP "libexec" 4 .IX Item "libexec" .PD .PP \fIsearch_inc_dirs\fR .IX Subsection "search_inc_dirs" .PP .Vb 1 \& my @search_inc_dirs = $apache\->search_inc_dirs; .Ve .PP Returns a list of possible directories in which to search for Apache include files. By default, it returns this list of directories, each appended to the name of the directory returned by \f(CW\*(C`httpd_root()\*(C'\fR: .IP "include" 4 .IX Item "include" .PD 0 .IP "inc" 4 .IX Item "inc" .PD .PP \fIsearch_conf_names\fR .IX Subsection "search_conf_names" .PP .Vb 1 \& my @search_conf_dirs = $apache\->search_conf_dirs; .Ve .PP Returns a list of possible names for Apache configuration files. These will be used bye the \f(CW\*(C`conf_file()\*(C'\fR method to search for Apache configuration files. By Default, the possible configuration file names are: .IP "\fIhttpd.conf\fR" 4 .IX Item "httpd.conf" .PD 0 .IP "\fIhttpd.conf.default\fR" 4 .IX Item "httpd.conf.default" .PD .PP \fIsearch_conf_dirs\fR .IX Subsection "search_conf_dirs" .PP .Vb 1 \& my @search_conf_dirs = $apache\->search_conf_dirs; .Ve .PP Returns a list of directories in which the \f(CW\*(C`conf_file()\*(C'\fR method will search for Apache configuration files. .IP "/usr/share/doc/apache\-perl" 4 .IX Item "/usr/share/doc/apache-perl" .PD 0 .IP "/etc/httpd" 4 .IX Item "/etc/httpd" .PD .SS "Other Executable Methods" .IX Subsection "Other Executable Methods" These methods return the complete paths to their like-named executables. Apache comes with a fair number of them; we provide these methods to provide a path to a subset of them. Each method, when called, checks for an executable in the directory returned by \f(CW\*(C`bin_dir()\*(C'\fR. The name of the executable must be one of the names returned by the corresponding \f(CW\*(C`search_*_names\*(C'\fR method. .PP The available executable methods are: .IP "ab" 4 .IX Item "ab" .PD 0 .IP "apachectl" 4 .IX Item "apachectl" .IP "apxs" 4 .IX Item "apxs" .IP "htdigest" 4 .IX Item "htdigest" .IP "htpasswd" 4 .IX Item "htpasswd" .IP "logresolve" 4 .IX Item "logresolve" .IP "rotatelogs" 4 .IX Item "rotatelogs" .PD .PP And the corresponding search names methods are: .IP "search_ab_names" 4 .IX Item "search_ab_names" .PD 0 .IP "search_apachectl_names" 4 .IX Item "search_apachectl_names" .IP "search_apxs_names" 4 .IX Item "search_apxs_names" .IP "search_htdigest_names" 4 .IX Item "search_htdigest_names" .IP "search_htpasswd_names" 4 .IX Item "search_htpasswd_names" .IP "search_logresolve_names" 4 .IX Item "search_logresolve_names" .IP "search_rotatelogs_names" 4 .IX Item "search_rotatelogs_names" .PD .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Looking for executable .IP "confirm" 4 .IX Item "confirm" Path to executable? .IP "unknown" 4 .IX Item "unknown" Path to executable? .SH "KNOWN ISSUES" .IX Header "KNOWN ISSUES" It's likely that a lot more can be done to collect data about Apache. The methodology for determining the lib, inc, bin, and so_lib directories in particular may be considered rather weak. And the Port number can be specified multiple ways (and times!) in an Apache configuration file. Patches from those who know a great deal more about interrogating Apache will be most welcome. .SH "TO DO" .IX Header "TO DO" Add method to return the names of available DSOs. These should either be parsed from the \fIhttpd.conf\fR file or \f(CW\*(C`glob\*(C'\fRbed from the file system. .SH "SUPPORT" .IX Header "SUPPORT" This module is stored in an open GitHub repository . Feel free to fork and contribute! .PP Please file bug reports via GitHub Issues or by sending mail to bug\-App\-Info@rt.cpan.org . .SH "AUTHOR" .IX Header "AUTHOR" David E. Wheeler based on code by Sam Tregar . .SH "SEE ALSO" .IX Header "SEE ALSO" App::Info documents the event handling interface. .PP App::Info::HTTPD is the App::Info::HTTP::Apache parent class. .PP Apache and mod_perl_mod_perl document mod_perl. .PP is the Apache web server home page. .PP is the mod_perl home page. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (c) 2002\-2011, David E. Wheeler. Some Rights Reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.