diff options
Diffstat (limited to 'rt/devel/tools/apache.conf')
-rw-r--r-- | rt/devel/tools/apache.conf | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/rt/devel/tools/apache.conf b/rt/devel/tools/apache.conf new file mode 100644 index 0000000..2ae67c6 --- /dev/null +++ b/rt/devel/tools/apache.conf @@ -0,0 +1,173 @@ +# Single-process Apache testing with mod_perl, mod_fcgi, or mod_fastcgi +# +# Start this via: +# apache2 -f `pwd`/devel/tools/apache.conf -DPERL -k start +# +# The full path to the configuration file is needed, or Apache assumes +# it is under the ServerRoot. Since the deployment strategies differ +# between RT 3 and 4, you must either supply -DRT3 if you are attempting +# to deploy an rt3 instance. You must also supply one of -DPERL, +# -DFASTCGI, or -DFCGID. +# +# The /opt/rt4/etc/apache_local.conf file should contain: +# User chmrr +# Group chmrr +# Listen 8080 +# ...or the equivilent. +# +# Apache access and error logs will be written to /opt/rt4/var/log/. +# +<IfDefine !RT3> +Include /opt/rt4/etc/apache_local.conf +</IfDefine> +<IfDefine RT3> +Include /opt/rt3/etc/apache_local.conf +</IfDefine> + +<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> + +ServerRoot /etc/apache2 +PidFile /opt/rt4/var/apache2.pid +LockFile /opt/rt4/var/apache2.lock +ServerAdmin root@localhost + +LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so +LoadModule env_module /usr/lib/apache2/modules/mod_env.so +LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so +LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so +<IfDefine PERL> + LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so +</IfDefine> +<IfDefine FASTCGI> + LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so +</IfDefine> +<IfDefine FCGID> + LoadModule fcgid_module /usr/lib/apache2/modules/mod_fcgid.so +</IfDefine> + +ErrorLog "/opt/rt4/var/log/apache-error.log" +TransferLog "/opt/rt4/var/log/apache-access.log" +LogLevel debug + +<Directory /> + Options FollowSymLinks + AllowOverride None + Order deny,allow + Deny from all +</Directory> + +AddDefaultCharset UTF-8 + +DocumentRoot /var/www +<Directory /var/www> + Order allow,deny + Allow from all +</Directory> + +Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/ +<Directory /opt/rt4/share/html/NoAuth/images> + Order allow,deny + Allow from all +</Directory> + +<IfDefine !RT3> +########## 4.0 mod_perl +<IfDefine PERL> + PerlSetEnv RT_SITE_CONFIG /opt/rt4/etc/RT_SiteConfig.pm + <Location /> + Order allow,deny + Allow from all + SetHandler modperl + PerlResponseHandler Plack::Handler::Apache2 + PerlSetVar psgi_app /opt/rt4/sbin/rt-server + </Location> + <Perl> + use Plack::Handler::Apache2; + Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server"); + </Perl> +</IfDefine> + +########## 4.0 mod_fastcgi +<IfDefine FASTCGI> + FastCgiIpcDir /opt/rt4/var + FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 1 -idle-timeout 300 + ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/ + <Location /> + Order allow,deny + Allow from all + Options +ExecCGI + AddHandler fastcgi-script fcgi + </Location> +</IfDefine> + +########## 4.0 mod_fcgid +<IfDefine FCGID> + FcgidProcessTableFile /opt/rt4/var/fcgid_shm + FcgidIPCDir /opt/rt4/var + ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/ + <Location /> + Order allow,deny + Allow from all + Options +ExecCGI + AddHandler fcgid-script fcgi + </Location> +</IfDefine> +</IfDefine> + + +<IfDefine RT3> +########## 3.8 mod_perl +<IfDefine PERL> + PerlSetEnv RT_SITE_CONFIG /opt/rt3/etc/RT_SiteConfig.pm + PerlRequire "/opt/rt3/bin/webmux.pl" + <Location /NoAuth/images> + SetHandler default + </Location> + <Location /> + SetHandler perl-script + PerlResponseHandler RT::Mason + </Location> +</IfDefine> + +########## 3.8 mod_fastcgi +<IfDefine FASTCGI> + FastCgiIpcDir /opt/rt3/var + FastCgiServer /opt/rt3/bin/mason_handler.fcgi -processes 1 -idle-timeout 300 + ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/ + <Location /> + Order allow,deny + Allow from all + Options +ExecCGI + AddHandler fastcgi-script fcgi + </Location> +</IfDefine> + +########## 3.8 mod_fcgid +<IfDefine FCGID> + FcgidProcessTableFile /opt/rt3/var/fcgid_shm + FcgidIPCDir /opt/rt3/var + ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/ + <Location /> + Order allow,deny + Allow from all + Options +ExecCGI + AddHandler fcgid-script fcgi + </Location> +</IfDefine> +</IfDefine> |