summaryrefslogtreecommitdiff
path: root/rt/devel/tools/apache.conf
blob: 2ae67c651e5f186f2dde90788218f2d7c86d0509 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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>