This file is indexed.

/usr/share/doc/rt4-doc-html/web_deployment.html is in rt4-doc-html 4.4.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<ul id="index">
  <li><a href="#Setting-up-the-web-interface">Setting up the web interface</a>
    <ul>
      <li><a href="#Standalone">Standalone</a></li>
      <li><a href="#Apache">Apache</a>
        <ul>
          <li><a href="#mod_fastcgi">mod_fastcgi</a></li>
          <li><a href="#mod_fcgid">mod_fcgid</a></li>
          <li><a href="#mod_perl-2.xx">mod_perl 2.xx</a></li>
          <li><a href="#mod_perl-1.xx">mod_perl 1.xx</a></li>
        </ul>
      </li>
      <li><a href="#nginx">nginx</a></li>
      <li><a href="#lighttpd">lighttpd</a></li>
    </ul>
  </li>
  <li><a href="#Running-RT-at-rt-rather-than">Running RT at /rt rather than /</a></li>
</ul>

<h1 id="Setting-up-the-web-interface"><a href="#___top">Setting up the web interface</a></h1>

<p>As of RT 3.9, RT&#39;s web interface speaks PSGI (<a href="http://plackperl.org">http://plackperl.org</a>) which lets you use RT with any PSGI-supported web server (which includes Apache, nginx, lighttpd, etc).</p>

<h2 id="Standalone"><a href="#___top">Standalone</a></h2>

<p>The standalone RT web server is backed by a pure-Perl server engine (<a href="http://metacpan.org/module/HTTP::Server::PSGI">HTTP::Server::PSGI</a>). This standalone server is appropriate for development and testing, but is not appropriate for production use.</p>

<p>You should not run this server against port 80 (which is the default port) because that requires root-level privileges and may conflict with any existing listeners. So choose a high port (for example 8080) and start the standalone server with:</p>

<pre><code>    /opt/rt4/sbin/rt-server --port 8080</code></pre>

<p>You can also run <code>rt-server</code> with any other PSGI server, for example, to use <a href="http://metacpan.org/module/Starman">Starman</a>, a high performance preforking server:</p>

<pre><code>    /opt/rt4/sbin/rt-server --server Starman --port 8080</code></pre>

<h2 id="Apache"><a href="#___top">Apache</a></h2>

<p><b>WARNING</b>: Both <code>mod_speling</code> and <code>mod_cache</code> are known to break RT. <code>mod_speling</code> will cause RT&#39;s CSS and JS to not be loaded, making RT appear unstyled. <code>mod_cache</code> will cache cookies, making users be spontaneously logged in as other users in the system.</p>

<p>See also <a href="authentication.html#Apache-configuration">&quot;Apache configuration&quot; in authentication</a>, in case you intend to use Apache to provide authentication.</p>

<h3 id="mod_fastcgi"><a href="#___top">mod_fastcgi</a></h3>

<pre><code>    # Tell FastCGI to put its temporary files somewhere sane; this may
    # be necessary if your distribution doesn&#39;t already set it
    #FastCgiIpcDir /tmp

    FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300

    &lt;VirtualHost rt.example.com&gt;
        ### Optional apache logs for RT
        # Ensure that your log rotation scripts know about these files
        # ErrorLog /opt/rt4/var/log/apache2.error
        # TransferLog /opt/rt4/var/log/apache2.access
        # LogLevel debug

        AddDefaultCharset UTF-8

        ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

        DocumentRoot &quot;/opt/rt4/share/html&quot;
        &lt;Location /&gt;
            &lt;IfVersion &gt;= 2.4&gt; # For Apache 2.4
                Require all granted
            &lt;/IfVersion&gt;
            &lt;IfVersion &lt; 2.4&gt;  # For Apache 2.2
                Order allow,deny
                Allow from all
            &lt;/IfVersion&gt;

            Options +ExecCGI
            AddHandler fastcgi-script fcgi
        &lt;/Location&gt;
    &lt;/VirtualHost&gt;</code></pre>

<h3 id="mod_fcgid"><a href="#___top">mod_fcgid</a></h3>

<p><b>WARNING</b>: Before mod_fcgid 2.3.6, the maximum request size was 1GB. Starting in 2.3.6, this is now 128Kb. This is unlikely to be large enough for any RT install that handles attachments. You can read more about FcgidMaxRequestLen at <a href="http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen">http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen</a></p>

<p>Most distributions will have a mod_fcgid.conf or similar file with mod_fcgid configurations and you should add:</p>

<pre><code>    FcgidMaxRequestLen 1073741824</code></pre>

<p>to return to the old default.</p>

<pre><code>    &lt;VirtualHost rt.example.com&gt;
        ### Optional apache logs for RT
        # Ensure that your log rotation scripts know about these files
        # ErrorLog /opt/rt4/var/log/apache2.error
        # TransferLog /opt/rt4/var/log/apache2.access
        # LogLevel debug

        AddDefaultCharset UTF-8

        ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

        DocumentRoot &quot;/opt/rt4/share/html&quot;
        &lt;Location /&gt;
            &lt;IfVersion &gt;= 2.4&gt; # For Apache 2.4
                Require all granted
            &lt;/IfVersion&gt;
            &lt;IfVersion &lt; 2.4&gt;  # For Apache 2.2
                Order allow,deny
                Allow from all
            &lt;/IfVersion&gt;

            Options +ExecCGI
            AddHandler fcgid-script fcgi
        &lt;/Location&gt;
    &lt;/VirtualHost&gt;</code></pre>

<h3 id="mod_perl-2.xx"><a href="#___top">mod_perl 2.xx</a></h3>

<p><b>WARNING: mod_perl 1.99_xx is not supported.</b></p>

<p><b>WARNING</b>: Due to thread-safety limitations, all timestamps will be presented in the webserver&#39;s default time zone when using the <code>worker</code> and <code>event</code> MPMs; the <code>$Timezone</code> setting and the user&#39;s timezone preference are ignored. We suggest the <code>prefork</code> MPM or FastCGI deployment if your privileged users are in a different timezone than the one the server is configured for.</p>

<p><b>NOTE</b>: RT 3.8 and below suggested use of <code>SetHandler perl-script</code>; this is incorrect for RT 4, and (starting in RT 4.0.11) RT will refuse to start, to prevent difficulties sending mail from RT. Change to <code>SetHandler modperl</code>, as the example below uses.</p>

<pre><code>    &lt;VirtualHost rt.example.com&gt;
        ### Optional apache logs for RT
        # ErrorLog /opt/rt4/var/log/apache2.error
        # TransferLog /opt/rt4/var/log/apache2.access
        # LogLevel debug

        AddDefaultCharset UTF-8

        DocumentRoot &quot;/opt/rt4/share/html&quot;
        &lt;Location /&gt;
            &lt;IfVersion &gt;= 2.4&gt; # For Apache 2.4
                Require all granted
            &lt;/IfVersion&gt;
            &lt;IfVersion &lt; 2.4&gt;  # For Apache 2.2
                Order allow,deny
                Allow from all
            &lt;/IfVersion&gt;

            SetHandler modperl
            PerlResponseHandler Plack::Handler::Apache2
            PerlSetVar psgi_app /opt/rt4/sbin/rt-server
        &lt;/Location&gt;
        &lt;Perl&gt;
            use Plack::Handler::Apache2;
            Plack::Handler::Apache2-&gt;preload(&quot;/opt/rt4/sbin/rt-server&quot;);
        &lt;/Perl&gt;
    &lt;/VirtualHost&gt;</code></pre>

<h3 id="mod_perl-1.xx"><a href="#___top">mod_perl 1.xx</a></h3>

<p><b>WARNING: mod_perl 1.99_xx is not supported.</b></p>

<p>To run RT using mod_perl 1.xx please see <a href="http://metacpan.org/module/Plack::Handler::Apache1">Plack::Handler::Apache1</a> for configuration examples.</p>

<h2 id="nginx"><a href="#___top">nginx</a></h2>

<p><code>nginx</code> requires that you start RT&#39;s fastcgi process externally, for example using <code>spawn-fcgi</code>:</p>

<pre><code>    spawn-fcgi -u www-data -g www-data -a 127.0.0.1 -p 9000 \
        -- /opt/rt4/sbin/rt-server.fcgi</code></pre>

<p>With the nginx configuration:</p>

<pre><code>    server {
        listen 80;
        server_name rt.example.com;
        access_log  /var/log/nginx/access.log;

        location / {
            fastcgi_param  QUERY_STRING       $query_string;
            fastcgi_param  REQUEST_METHOD     $request_method;
            fastcgi_param  CONTENT_TYPE       $content_type;
            fastcgi_param  CONTENT_LENGTH     $content_length;

            fastcgi_param  SCRIPT_NAME        &quot;&quot;;
            fastcgi_param  PATH_INFO          $uri;
            fastcgi_param  REQUEST_URI        $request_uri;
            fastcgi_param  DOCUMENT_URI       $document_uri;
            fastcgi_param  DOCUMENT_ROOT      $document_root;
            fastcgi_param  SERVER_PROTOCOL    $server_protocol;

            fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
            fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

            fastcgi_param  REMOTE_ADDR        $remote_addr;
            fastcgi_param  REMOTE_PORT        $remote_port;
            fastcgi_param  SERVER_ADDR        $server_addr;
            fastcgi_param  SERVER_PORT        $server_port;
            fastcgi_param  SERVER_NAME        $server_name;
            fastcgi_pass 127.0.0.1:9000;
        }
    }</code></pre>

<h2 id="lighttpd"><a href="#___top">lighttpd</a></h2>

<pre><code>    server.modules += ( &quot;mod_fastcgi&quot; )
    $HTTP[&quot;host&quot;] =~ &quot;^rt.example.com&quot; {
        fastcgi.server = (
            &quot;/&quot; =&gt; (
                &quot;rt&quot; =&gt; (
                    &quot;socket&quot;      =&gt; &quot;/opt/rt4/var/socket&quot;,
                    &quot;bin-path&quot;    =&gt; &quot;/opt/rt4/sbin/rt-server.fcgi&quot;,
                    &quot;check-local&quot; =&gt; &quot;disable&quot;,
                    &quot;fix-root-scriptname&quot; =&gt; &quot;enable&quot;,
                )
            )
        )
    }</code></pre>

<h1 id="Running-RT-at-rt-rather-than"><a href="#___top">Running RT at /rt rather than /</a></h1>

<p>First you need to tell RT where it&#39;s located by setting <code>$WebPath</code> in your <i>RT_SiteConfig.pm</i>:</p>

<pre><code>    # Important: don&#39;t include a trailing slash here.  Read `perldoc
    # etc/RT_Config.pm` for more information.
    Set($WebPath, &quot;/rt&quot;);</code></pre>

<p>Then you need to update your Apache configuration to match. Prefix any RT related <code>ScriptAlias</code> and <code>Location</code> directives with <code>/rt</code>. You should also make sure <code>DocumentRoot</code> is <b>not</b> set to <code>/opt/rt4/share/html/</code>, otherwise RT&#39;s source will be served from <code>/</code>.</p>

<p>For example: if you&#39;re using the sample FastCGI config above, you might change the relevant directives to:</p>

<pre><code>    ScriptAlias /rt /opt/rt4/sbin/rt-server.fcgi/

    # Set DocumentRoot as appropriate for the other content you want to serve
    DocumentRoot /var/www

    &lt;Location /rt&gt;
        ...
    &lt;/Location&gt;</code></pre>

<p>If you&#39;re using the sample mod_perl configuration, you only need to change the <code>Location</code> directive.</p>

<p>If you&#39;re not using Apache, please see <a href="http://metacpan.org/module/Plack::Handler::FCGI">Plack::Handler::FCGI</a> or the web server&#39;s own documentation for configuration examples.</p>

<a href="./">&larr; Back to index</a>