|< Day Day Up >|
Depending on your configuration, you might not be able to, or want to, run RT on your main webserver. One solution to this problem is to use a proxy in front of it. Figure 2-1 shows a proxied RT server. Apache 2.x, beyond being a webserver, also can function as a high-performance proxy.
There are several reasons you might want to do this:
First, only one instance of a mod_perl 1.x application can run inside Apache at a time, because there is a shared Perl interpreter. Multiple instances of an application can conflict with unexpected and undesirable results. A proxy can be used to map multiple instances into one URLspace.
Apache 2.x and mod_perl 2.x doesn't have this limitation. Perl interpreters can be bound to VirtualHosts or Locations with PerlOptions +Parent .
Second, Perl applications use a lot of RAM, and all Apache processes will end up allocating this RAM. If you also are serving static content, the memory usage will be high, thus limiting the number of Apache processes a machine can support and throughput..
Third, a proxy can allow your server to serve more requests. The back-end server won't need to buffer for a slow network connection and can quickly return to serving requests. This means you will need fewer heavy mod_perl processes running.
Finally, RT is designed to be a secure application, but as with any piece of software there is always potential for a hole to be found. By using a proxy to a dedicated Apache server, RT can be isolated from other services on the system. A compromise of RT would not imply instant access to the rest of the web system.
Apache 2.x is a good candidate for this, as it's a bit faster and a little more flexible than Apache 1.x.
In your front-end proxy webserver, use the following configuration, after making sure that mod_rewrite and mod-proxy loaded:
<VirtualHost *> ServerName rt.example.com RewriteEngine On RewriteRule ^/(.*)$ http://localhost:8284/$1 [P,L] </VirtualHost>
Under Apache 2.x, mod_proxy offers a cleaner configuration:
<VirtualHost *> ServerName rt.example.com ProxyPass / http://localhost:8284/ ProxyPassReverse / http://localhost:8284/ </VirtualHost>
Then, as shown in Figure 2-1, configure another Apache running RT on a high-numbered port, such as 8284 in this example. You can configure your firewall so it can only receive traffic from the proxy server.
This approach is explained in great detail in the mod_perl documentation, at http://perl.apache.org/docs/1.0/guide/strategy.html, and in the mod_perl Developer's Cookbook, by Geoffrey Young, Paul Lindner, and Randy Kobes (Sams) and in Practical mod_perl by Stas Bekman and Eric Cholet (O'Reilly).
Figure 2-1. Proxied RT server
2.3.7. Standalone Server
RT also includes a standalone webserver. It doesn't need Apache or anything besides Perl and RT.
You can start it by running bin/standalone_httpd. You may also specify a port number, i.e. bin/standalone_httpd 8888.
The standalone server is meant primarily for development. It can do only one thing at a time, which makes it suboptimal for multiple concurrent users.
|< Day Day Up >|