From 186ade7aaa57d4b474c2e9fb62801edb1761978a Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Thu, 11 Aug 2011 13:04:40 -0400 Subject: [PATCH 1/6] Reorganize by web server Instead of having nginx and lighttpd be under the fcgi section, group by Apache/nginx/lighttpd. Also moves mod_perl1/2 together at the bottom of the apache section. --- docs/web_deployment.pod | 81 +++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod index e789c7197fa..d218b488bcc 100644 --- a/docs/web_deployment.pod +++ b/docs/web_deployment.pod @@ -22,47 +22,40 @@ to use L, a high performance preforking server: /opt/rt4/sbin/rt-server --server Starman --port 8080 -=head2 mod_perl 2.xx +=head2 Apache -B -B: Due to thread-safety limitations, all timestamps will be -presented in the webserver's default time zone when using the C -and C MPMs; the C<$Timezone> setting and the user's timezone -preference are ignored. We suggest the C MPM or FastCGI -deployment if your privileged users are in a different timezone than the -one the server is configured for. +=head3 mod_fastcgi + + # Tell FastCGI to put its temporary files somewhere sane; this may + # be necessary if your distribution doesn't already set it + #FastCgiIpcDir /tmp + + FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300 ### 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 + Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/ + ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/ + DocumentRoot "/opt/rt4/share/html" Order allow,deny Allow from all - SetHandler modperl - PerlResponseHandler Plack::Handler::Apache2 - PerlSetVar psgi_app /opt/rt4/sbin/rt-server + Options +ExecCGI + AddHandler fastcgi-script fcgi - - use Plack::Handler::Apache2; - Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server"); - -=head2 mod_fastcgi - - # Tell FastCGI to put its temporary files somewhere sane; this may - # be necessary if your distribution doesn't already set it - #FastCgiIpcDir /tmp - - FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300 +=head3 mod_fcgid ### Optional apache logs for RT @@ -82,35 +75,52 @@ one the server is configured for. Allow from all Options +ExecCGI - AddHandler fastcgi-script fcgi + AddHandler fcgid-script fcgi -=head2 mod_fcgid +=head3 mod_perl 2.xx + +B + +B: Due to thread-safety limitations, all timestamps will be +presented in the webserver's default time zone when using the C +and C MPMs; the C<$Timezone> setting and the user's timezone +preference are ignored. We suggest the C MPM or FastCGI +deployment if your privileged users are in a different timezone than the +one the server is configured for. ### 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 - Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/ - ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/ - DocumentRoot "/opt/rt4/share/html" Order allow,deny Allow from all - Options +ExecCGI - AddHandler fcgid-script fcgi + SetHandler modperl + PerlResponseHandler Plack::Handler::Apache2 + PerlSetVar psgi_app /opt/rt4/sbin/rt-server + + use Plack::Handler::Apache2; + Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server"); + -=head3 nginx +=head2 mod_perl 1.xx + +B + +To run RT using mod_perl 1.xx please see L for +configuration examples. + +=head2 nginx C requires that you start RT's fastcgi process externally, for example using C: @@ -154,7 +164,7 @@ With the nginx configuration: } } -=head3 lighttpd +=head2 lighttpd server.modules += ( "mod_fastcgi" ) $HTTP["host"] =~ "^rt.example.com" { @@ -176,13 +186,6 @@ With the nginx configuration: } -=head2 mod_perl 1.xx - -B - -To run RT using mod_perl 1.xx please see L for -configuration examples. - =cut =head1 Running RT at /rt rather than / From dc5df6dd89a9f7a7e6ef23a7cc0f61729bb2b426 Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Thu, 11 Aug 2011 13:05:33 -0400 Subject: [PATCH 2/6] Warn about mod_speling and mod_cache and the fail they cause --- docs/web_deployment.pod | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod index d218b488bcc..2b5bbc74bdf 100644 --- a/docs/web_deployment.pod +++ b/docs/web_deployment.pod @@ -24,6 +24,10 @@ to use L, a high performance preforking server: =head2 Apache +B: Both mod_speling and mod_cache are known to break RT. +mod_speling will cause RT's CSS and JS to not be loaded, making RT +appear unstyled. mod_cache will cause cookies to be cached, making it +appear that RT is logging you in as a different user. =head3 mod_fastcgi From 88d6d91d17cde807ea3b693a2a04141261d505ec Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 11 Aug 2011 13:40:06 -0400 Subject: [PATCH 3/6] Fix =head3 on mod_perl 1.xx --- docs/web_deployment.pod | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod index 2b5bbc74bdf..42f079dfb12 100644 --- a/docs/web_deployment.pod +++ b/docs/web_deployment.pod @@ -117,7 +117,7 @@ one the server is configured for. -=head2 mod_perl 1.xx +=head3 mod_perl 1.xx B @@ -190,8 +190,6 @@ With the nginx configuration: } -=cut - =head1 Running RT at /rt rather than / First you need to tell RT where it's located by setting C<$WebPath> in your From 3efeba7b042d4a4bde8144801a3a28917954381e Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 11 Aug 2011 13:41:57 -0400 Subject: [PATCH 4/6] Format the module names using C<> --- docs/web_deployment.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod index 42f079dfb12..19d11cf3c8f 100644 --- a/docs/web_deployment.pod +++ b/docs/web_deployment.pod @@ -24,9 +24,9 @@ to use L, a high performance preforking server: =head2 Apache -B: Both mod_speling and mod_cache are known to break RT. -mod_speling will cause RT's CSS and JS to not be loaded, making RT -appear unstyled. mod_cache will cause cookies to be cached, making it +B: Both C and C are known to break RT. +C will cause RT's CSS and JS to not be loaded, making RT +appear unstyled. C will cause cookies to be cached, making it appear that RT is logging you in as a different user. =head3 mod_fastcgi From 26dbc39215bfce484e17cfed9b8147e0fb68d8ea Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 11 Aug 2011 13:42:45 -0400 Subject: [PATCH 5/6] Note the failure mode of running standalone and then Apache --- docs/web_deployment.pod | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod index 19d11cf3c8f..7b0c5f195db 100644 --- a/docs/web_deployment.pod +++ b/docs/web_deployment.pod @@ -22,6 +22,12 @@ to use L, a high performance preforking server: /opt/rt4/sbin/rt-server --server Starman --port 8080 +B: After you run the standalone server as root, you will need to +remove your C directory, or the non-standalone servers +(Apache, etc), which run as a non-privileged user, will not be able to +write to it and will not work. + + =head2 Apache B: Both C and C are known to break RT. @@ -124,6 +130,7 @@ B To run RT using mod_perl 1.xx please see L for configuration examples. + =head2 nginx C requires that you start RT's fastcgi process externally, for @@ -168,6 +175,7 @@ With the nginx configuration: } } + =head2 lighttpd server.modules += ( "mod_fastcgi" ) From ec4b18e31c3a92e63105664045d8460396c30d0a Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 11 Aug 2011 13:45:23 -0400 Subject: [PATCH 6/6] Strengthen mod_cache warning to make the extent of the failure clearer --- docs/web_deployment.pod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/web_deployment.pod b/docs/web_deployment.pod index 7b0c5f195db..999195a3ff5 100644 --- a/docs/web_deployment.pod +++ b/docs/web_deployment.pod @@ -32,8 +32,8 @@ write to it and will not work. B: Both C and C are known to break RT. C will cause RT's CSS and JS to not be loaded, making RT -appear unstyled. C will cause cookies to be cached, making it -appear that RT is logging you in as a different user. +appear unstyled. C will cache cookies, making users be +spontaneously logged in as other users in the system. =head3 mod_fastcgi