authorSergey Poznyakoff <>2018-02-24 09:13:25 (GMT)
committer Sergey Poznyakoff <>2018-02-24 09:13:25 (GMT)
commitd9bdc9cfcb2f10ea3642b6150e1c4fddbf9facdb (patch) (side-by-side diff)
parent8147f2b3c96bc6b387f0aa5a7d195de233215484 (diff)
Update docs
Diffstat (more/less context) (ignore whitespace changes)
2 files changed, 27 insertions, 11 deletions
diff --git a/Changes b/Changes
new file mode 100644
index 0000000..c7d5cbe
--- a/dev/null
+++ b/Changes
@@ -0,0 +1,3 @@
+1.00 2018-02-24
+* Initial release.
diff --git a/lib/Apache/ b/lib/Apache/
index b980333..70d5385 100644
--- a/lib/Apache/
+++ b/lib/Apache/
@@ -9,7 +9,7 @@ use Text::ParseWords;
use Symbol 'gensym';
use Carp;
-our $VERSION = '0.10';
+our $VERSION = '1.00';
sub new {
my $class = shift;
@@ -176,6 +176,15 @@ my @ATTRIBUTES = qw(status error
sub server_root { shift->defines('HTTPD_ROOT') }
+sub server_config {
+ my $self = shift;
+ my $conf = $self->defines('SERVER_CONFIG_FILE');
+ if ($conf && !File::Spec->file_name_is_absolute($conf)) {
+ $conf = File::Spec->catfile($self->server_root, $conf);
+ }
+ return $conf;
sub defines {
my $self = shift;
if (@_) {
@@ -339,6 +348,7 @@ Apache::Defaults - Get default settings for Apache httpd daemon
print $x->name;
print $x->version;
print $x->server_root;
+ print $x->server_config;
print $x->built;
print $x->architecture;
print $x->MPM;
@@ -377,13 +387,13 @@ The default used in the absense of this attribute is:
=item C<environ>
Name of the shell script that sets the environment for B<httpd> invocation.
-For some obscure reason, B<httpd> attempts to read its configuration file
-even if invoked with the B<-V> option (which is intended to print the version
-and build parameters of the daemon). It will fail if its configuration refers
-to the environment variables, defined elsewhere. This situation is quite
-common in Debian-based distributions, which define the environment variables
-in file F</etc/apache2/envvars>. This attribute is intended to cope with
-such problems, e.g.:
+If invoked with the B<-V> option, B<httpd> attempts to read its configuration
+file and will fail if the latter contains references to the environment
+variables defined elsewhere. This is quite common in Debian-based
+distributions, which define the environment variables in file
+F</etc/apache2/envvars>. To avoid such failures, use the C<environ> attribute,
$x = new Apache::Defaults(environ => /etc/apache2/envvars)
@@ -397,9 +407,6 @@ will be available via the B<status> and B<error> methods.
-The method will I<croak> if an error occurs (e.g. the server binary
-is not found or exits with failure).
=head2 status
$x = new Apache::Defaults(on_error => 'return');
@@ -430,6 +437,12 @@ Returns the pathname of the B<httpd> binary.
Returns the full command line of the B<httpd> binary.
+=head2 server_config
+ $s = $x->server_config;
+Returns the full pathname of the server configuration file.
=head2 environ
$hashref = $x->environ;

Return to:

Send suggestions and report system problems to the System administrator.