[Rt-commit] rt branch, 4.0/devel-apache, updated. rt-4.0.5-88-g7f31814
Alex Vandiver
alexmv at bestpractical.com
Mon Aug 27 13:59:24 EDT 2012
The branch, 4.0/devel-apache has been updated
via 7f31814fd556505fb90c31352973fd86093b87fd (commit)
via 4239711d9d55c1314906e1f061fe12117ce193e2 (commit)
via 28ea926c788cc65e41e357228e8579e1afb72036 (commit)
via d37798ac720a502275d45d812e1f76c6b770ffb1 (commit)
from 8d97684f351762078e5c34ed61db14880f9a5004 (commit)
Summary of changes:
devel/tools/rt-apache | 71 ++++++++++++++++++++++++++++++---------------------
1 file changed, 42 insertions(+), 29 deletions(-)
- Log -----------------------------------------------------------------
commit d37798ac720a502275d45d812e1f76c6b770ffb1
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 27 13:47:52 2012 -0400
Correct RT3 detection -- bin/rt-server.fcgi has never existed
diff --git a/devel/tools/rt-apache b/devel/tools/rt-apache
index 1c530e8..8c15113 100755
--- a/devel/tools/rt-apache
+++ b/devel/tools/rt-apache
@@ -55,7 +55,7 @@ die "$opt{root} doesn't look like an RT install\n"
unless -e "$opt{root}/lib/RT.pm";
# Detect if we are actually rt3
-if (not -e "$opt{root}/bin/rt-server.fcgi"
+if (not -e "$opt{root}/sbin/rt-server.fcgi"
and -e "$opt{root}/bin/mason_handler.fcgi") {
$opt{rt3}++;
warn "RT3 install detected!\n";
commit 28ea926c788cc65e41e357228e8579e1afb72036
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 27 13:48:58 2012 -0400
Bring in the MaxRequestLen change suggested in 89c6750
diff --git a/devel/tools/rt-apache b/devel/tools/rt-apache
index 8c15113..358e103 100755
--- a/devel/tools/rt-apache
+++ b/devel/tools/rt-apache
@@ -307,6 +307,7 @@ Alias $PATH/NoAuth/images/ $RTHOME/share/html/NoAuth/images/
<IfDefine FCGID>
FcgidProcessTableFile $RTHOME/var/fcgid_shm
FcgidIPCDir $RTHOME/var
+ FcgidMaxRequestLen 1073741824
ScriptAlias $PATH $RTHOME/sbin/rt-server.fcgi/
<Location $PATH>
Order allow,deny
@@ -349,6 +350,7 @@ Alias $PATH/NoAuth/images/ $RTHOME/share/html/NoAuth/images/
<IfDefine FCGID>
FcgidProcessTableFile $RTHOME/var/fcgid_shm
FcgidIPCDir $RTHOME/var
+ FcgidMaxRequestLen 1073741824
ScriptAlias $PATH $RTHOME/bin/mason_handler.fcgi/
<Location $PATH>
Order allow,deny
commit 4239711d9d55c1314906e1f061fe12117ce193e2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 27 13:57:06 2012 -0400
Default to running more than one process
As only some types of debugging benefit from running as a single
process/thread, default to starting multiple, with the new --single
option (or -X, to mirror apache) to revert to the old behavior.
diff --git a/devel/tools/rt-apache b/devel/tools/rt-apache
index 358e103..c012330 100755
--- a/devel/tools/rt-apache
+++ b/devel/tools/rt-apache
@@ -28,6 +28,7 @@ GetOptions( \%opt,
"port|p=i",
"ssl:i",
+ "single|X",
"modules=s",
@@ -83,6 +84,7 @@ $template =~ s/\$SSL/$opt{ssl} || 0/ge;
$template =~ s/\$RTHOME/$opt{root}/g;
$template =~ s/\$MODULES/$opt{modules}/g;
$template =~ s/\$TOOLS/$FindBin::Bin/g;
+$template =~ s/\$PROCESSES/$opt{single} ? 1 : 3/ge;
my $conf = "$opt{root}/var/apache.conf";
open(CONF, ">", $conf)
@@ -93,7 +95,7 @@ close CONF;
my @opts = ("-f", $conf, "-D" . uc($mod) );
push @opts, "-DSSL" if $opt{ssl};
push @opts, "-DRT3" if $opt{rt3};
-
+push @opts, "-DSINGLE" if $opt{debug};
# Wait for a previous run to terminate
if ( open( PIDFILE, "<", "$opt{root}/var/apache2.pid") ) {
@@ -141,7 +143,7 @@ sub parseconf {
=head1 NAME
-rt-apache - Wrapper to start single-threaded Apache running RT
+rt-apache - Wrapper to start Apache running RT
=head1 DESCRIPTION
@@ -153,8 +155,8 @@ please read the provided F<docs/web_deployment.pod> file.
Running this script will start F<apache2> with a custom-built
configuration file, built based on command-line options and the contents
of your F<RT_SiteConfig.pm>. It will work with either RT 3.8.x or RT
-4.0.x. As it is primarily for simple testing, it only starts one Apache
-process or thread, and runs as the current user.
+4.0.x. As it is primarily for simple testing, it runs Apache as the
+current user.
=head1 OPTIONS
@@ -184,6 +186,10 @@ Also listens on the provided port with HTTPS, using a self-signed
certificate for C<localhost>. If the port number is not specified,
defaults to port 4430.
+=item --single, -X
+
+Run only one process or thread, for ease of debugging.
+
=item --rt3, -3
Declares that the RT install in question is RT 3.8.x. C<rt-apache> can
@@ -200,23 +206,25 @@ to F</usr/lib/apache2/modules>.
=cut
__DATA__
-<IfModule mpm_prefork_module>
- StartServers 1
- MinSpareServers 1
- MaxSpareServers 1
- MaxClients 1
- MaxRequestsPerChild 0
-</IfModule>
-
-<IfModule mpm_worker_module>
- StartServers 1
- MinSpareThreads 1
- MaxSpareThreads 1
- ThreadLimit 1
- ThreadsPerChild 1
- MaxClients 1
- MaxRequestsPerChild 0
-</IfModule>
+<IfDefine SINGLE>
+ <IfModule mpm_prefork_module>
+ StartServers 1
+ MinSpareServers 1
+ MaxSpareServers 1
+ MaxClients 1
+ MaxRequestsPerChild 0
+ </IfModule>
+
+ <IfModule mpm_worker_module>
+ StartServers 1
+ MinSpareThreads 1
+ MaxSpareThreads 1
+ ThreadLimit 1
+ ThreadsPerChild 1
+ MaxClients 1
+ MaxRequestsPerChild 0
+ </IfModule>
+</IfDefine>
Listen $PORT
<IfDefine SSL>
@@ -293,7 +301,7 @@ Alias $PATH/NoAuth/images/ $RTHOME/share/html/NoAuth/images/
########## 4.0 mod_fastcgi
<IfDefine FASTCGI>
FastCgiIpcDir $RTHOME/var
- FastCgiServer $RTHOME/sbin/rt-server.fcgi -processes 1 -idle-timeout 300
+ FastCgiServer $RTHOME/sbin/rt-server.fcgi -processes $PROCESSES -idle-timeout 300
ScriptAlias $PATH $RTHOME/sbin/rt-server.fcgi/
<Location $PATH>
Order allow,deny
@@ -336,7 +344,7 @@ Alias $PATH/NoAuth/images/ $RTHOME/share/html/NoAuth/images/
########## 3.8 mod_fastcgi
<IfDefine FASTCGI>
FastCgiIpcDir $RTHOME/var
- FastCgiServer $RTHOME/bin/mason_handler.fcgi -processes 1 -idle-timeout 300
+ FastCgiServer $RTHOME/bin/mason_handler.fcgi -processes $PROCESSES -idle-timeout 300
ScriptAlias $PATH $RTHOME/bin/mason_handler.fcgi/
<Location $PATH>
Order allow,deny
commit 7f31814fd556505fb90c31352973fd86093b87fd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 27 13:59:12 2012 -0400
Default to mod_fastcgi, as it starts faster
diff --git a/devel/tools/rt-apache b/devel/tools/rt-apache
index c012330..bb35db2 100755
--- a/devel/tools/rt-apache
+++ b/devel/tools/rt-apache
@@ -41,14 +41,14 @@ my $mod;
if ($opt{fcgid} + $opt{fastcgi} + $opt{perl} > 1) {
die "Can only supply one of fcgid, fastcgi, or perl\n";
} elsif ($opt{fcgid} + $opt{fastcgi} + $opt{perl} == 0) {
- my @guess = qw(fcgid fastcgi perl);
+ my @guess = qw(fastcgi fcgid perl);
@guess = grep {-f "$opt{modules}/mod_$_.so"} @guess;
die "Neither mod_fcgid, mod_fastcgi, nor mod_perl are installed; aborting\n"
unless @guess;
warn "No deployment given -- assuming mod_$guess[0] deployment\n";
$mod = $guess[0];
} else {
- $mod = (grep {$opt{$_}} qw(fcgid fastcgi perl))[0];
+ $mod = (grep {$opt{$_}} qw(fastcgi fcgid perl))[0];
}
# Sanity check that the root contains an RT install
@@ -170,7 +170,7 @@ C<WebPort> configuration, and adjust its defaults accordingly.
The path to the RT install to serve. This defaults to the C<RTHOME>
environment variable, or C</opt/rt4>.
-=item --fcgid, --fastcgi, --perl
+=item --fastcgi, --fcgid, --perl
Determines the Apache module which is used. By default, the first one
of that list which exists will be used. See also L</--modules>.
@@ -198,8 +198,8 @@ usually detect this for you, however.
=item --modules B<path>
The path to the Apache2 modules directory, which is expected to contain
-one of F<mod_fcgid.so>, F<mod_fastcgi.so>, or F<mod_perl.so>. Defaults
-to F</usr/lib/apache2/modules>.
+at least one of F<mod_fcgid.so>, F<mod_fastcgi.so>, or F<mod_perl.so>.
+Defaults to F</usr/lib/apache2/modules>.
=back
@@ -256,6 +256,9 @@ TypesConfig $TOOLS/mime.types
LoadModule ssl_module $MODULES/mod_ssl.so
</IfDefine>
+<IfModule !log_config_module>
+ LoadModule log_config_module $MODULES/mod_log_config.so
+</IfModule>
ErrorLog "$RTHOME/var/log/apache-error.log"
TransferLog "$RTHOME/var/log/apache-access.log"
LogLevel notice
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list