[otrs-cvs] Support/Kernel/System/Support/Webserver Apache.pm, 1.15, 1.16
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/Support/Kernel/System/Support/Webserver
In directory lancelot:/tmp/cvs-serv26737/Kernel/System/Support/Webserver
Modified Files:
Apache.pm
Log Message:
- Added Apache tests for mod_deflate and mod_headers.
- Added Apache test that shows all server variables.
Author: mb
Index: Apache.pm
===================================================================
RCS file: /home/cvs/Support/Kernel/System/Support/Webserver/Apache.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -2 -u -d -r1.15 -r1.16
--- Apache.pm 4 Sep 2012 04:09:03 -0000 1.15
+++ Apache.pm 4 Jan 2013 11:10:18 -0000 1.16
@@ -1,5 +1,5 @@
# --
# Kernel/System/Support/Webserver/Apache.pm - all required system information
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# $Id$
@@ -94,4 +94,79 @@
}
+sub _ApacheModDeflateCheck {
+ my ( $Self, %Param ) = @_;
+
+ my $Check = 'Failed';
+ my $Message = $Self->{LanguageObject}->Get("You should enable mod_deflate.");
+
+ if ( $ENV{MOD_PERL} ) {
+ if ( Apache2::Module::loaded('mod_deflate.c') ) {
+ $Check = 'OK';
+ $Message = $Self->{LanguageObject}->Get("mod_deflate is enabled.");
+ }
+ }
+ else {
+ # just skip if not running mod_perl2
+ return;
+ }
+ my $Data = {
+ Name => 'Mod_deflate',
+ Description => $Self->{LanguageObject}
+ ->Get('Check if the system uses mod_deflate.'),
+ Comment => $Message,
+ Check => $Check,
+ };
+ return $Data;
+}
+
+sub _ApacheModHeadersCheck {
+ my ( $Self, %Param ) = @_;
+
+ my $Check = 'Failed';
+ my $Message = $Self->{LanguageObject}->Get("You should enable mod_headers.");
+
+ if ( $ENV{MOD_PERL} ) {
+ if ( Apache2::Module::loaded('mod_headers.c') ) {
+ $Check = 'OK';
+ $Message = $Self->{LanguageObject}->Get("mod_headers is enabled.");
+ }
+ }
+ else {
+ # just skip if not running mod_perl2
+ return;
+ }
+ my $Data = {
+ Name => 'Mod_headers',
+ Description => $Self->{LanguageObject}
+ ->Get('Check if the system uses mod_headers.'),
+ Comment => $Message,
+ Check => $Check,
+ };
+ return $Data;
+}
+
+sub _ApacheEnvironmentCheck {
+ my ( $Self, %Param ) = @_;
+
+ my %Environment = %ENV;
+
+ for my $NotNeededString (
+ qw( HTTP_REFERER HTTP_CACHE_CONTROL REQUEST_URI SCRIPT_NAME HTTP_USER_AGENT HTTP_ACCEPT_LANGUAGE HTTP_ACCEPT_ENCODING HTTP_ACCEPT )
+ )
+ {
+ delete $Environment{$NotNeededString};
+ }
+
+ my $Data = {
+ Name => $Self->{LanguageObject}->Get('Server Environment'),
+ Description => $Self->{LanguageObject}->Get('Display environment variables'),
+ Comment => $Self->{LanguageObject}->Get('General information about your system.'),
+ Check => 'OK',
+ BlockStyle => 'TableDataSimple',
+ TableInfo => \%Environment,
+ };
+ return $Data;
+}
+
sub _ApacheDBICheck {
my ( $Self, %Param ) = @_;
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log