--- loncom/lchttpdlogs 2011/11/03 22:32:04 1.1 +++ loncom/lchttpdlogs 2013/03/28 15:16:38 1.2 @@ -2,7 +2,7 @@ # # The Learning Online Network with CAPA # -# $Id: lchttpdlogs,v 1.1 2011/11/03 22:32:04 raeburn Exp $ +# $Id: lchttpdlogs,v 1.2 2013/03/28 15:16:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -124,8 +124,14 @@ sub check_httpd_logs { my ($distro,$protocol) = @_; my $text; my $logpath = '/var/log/httpd'; - if ($distro =~ /^(suse|debian|ubuntu)/) { - $logpath = '/var/log/apache2'; + my $access_log_file = 'access_log'; + my $error_log_file = 'error_log'; + if ($distro =~ /^(debian|ubuntu)/) { + $logpath = '/var/log/apache2'; + $access_log_file = 'access.log'; + $error_log_file = 'error.log'; + } elsif ($distro =~ /^suse/) { + $logpath = '/var/log/apache2'; } elsif ($distro =~ /^sles(\d+)/) { if ($1 >= 10) { $logpath = '/var/log/apache2'; @@ -133,8 +139,6 @@ sub check_httpd_logs { $logpath = '/var/log/apache'; } } - my $access_log_file = 'access_log'; - my $error_log_file = 'error_log'; if ($protocol eq 'https') { $access_log_file = 'ssl_'.$access_log_file; $error_log_file = 'ssl_'.$error_log_file;