<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=ApacheConfig</id>
	<title>ApacheConfig - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=ApacheConfig"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ApacheConfig&amp;action=history"/>
	<updated>2026-08-22T14:09:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ApacheConfig&amp;diff=172&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ApacheConfig&amp;diff=172&amp;oldid=prev"/>
		<updated>2016-04-06T20:03:14Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Consult with [[ManualApacheConfig]] for intial configuration of the apache server for RT.&lt;br /&gt;
&lt;br /&gt;
Here you&amp;#039;ll find some tips and additional notes.&lt;br /&gt;
&lt;br /&gt;
== Separate apache log files for RT ==&lt;br /&gt;
&lt;br /&gt;
Add the following lines to your RT&amp;#039;s virtual host in the apache config:&lt;br /&gt;
&lt;br /&gt;
 ErrorLog /opt/rt3/var/log/apache2.error&lt;br /&gt;
 TransferLog /opt/rt3/var/log/apache2.access&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t forget to create these files and grant rights to apache&amp;#039;s user.&lt;br /&gt;
&lt;br /&gt;
== mod_perl and caching connections to the DB ==&lt;br /&gt;
&lt;br /&gt;
Apache::DBI is perl module that works under mod_perl only and add transparent caching of connections to the DB. It may be helpful to do that as connect to some databases may be slow. If you followed [[ManualApacheConfig]] and using mod_perl then most probably you have Apache::DBI module installed.&lt;br /&gt;
&lt;br /&gt;
Add the following line to RT&amp;#039;s virtual host config:&lt;br /&gt;
&lt;br /&gt;
 PerlModule Apache::DBI&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If apache doesn&amp;#039;t restart, check the error_log file in the logs directory (e.g. /usr/local/apache2/logs/error_log). If you see something like:&lt;br /&gt;
&lt;br /&gt;
 Can&amp;#039;t locate Apache/DBI.pm in @INC&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
it is likely that Apache::DBI could not be found on your system.&lt;br /&gt;
&lt;br /&gt;
Use the following command to install the module or use system package tools:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -e &amp;#039;install Apache::DBI&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If this fails one of the tests it will report that the installation would have to be forced. Whether that is a good idea is up to you:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -e &amp;#039;force install Apache::DBI&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; Apache::DBI 0.94 only comes with tests that work with mysql. README says&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# only works with MySQL so far; patches welcome&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
so if you are using postgres, you will have to force it anyway.&lt;br /&gt;
&lt;br /&gt;
== How to avoid processing images like dynamic content ==&lt;br /&gt;
&lt;br /&gt;
=== Problem ===&lt;br /&gt;
&lt;br /&gt;
If you have mod_perl or [[FastCGI]] handler on location / then all files are handled by this handler. For example [[FastCGI]] try to execute your RT logo image like other dynamic scripts. This will cause the RT logo to be sent down as text/ascii, resulting in a &amp;quot;broken&amp;quot; image.&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Add to httpd.conf&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Location /NoAuth/images &amp;amp;gt;&lt;br /&gt;
     SetHandler default-handler&lt;br /&gt;
 &amp;amp;lt;/Location&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Also, make sure that your&lt;br /&gt;
&lt;br /&gt;
 Alias /NoAuth/images/ /opt/rt3/share/html/NoAuth/images&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
(if you have one) is &amp;#039;&amp;#039;&amp;#039;ABOVE&amp;#039;&amp;#039;&amp;#039; the ScriptAlias line pointing at mason_handler.fcgi.&lt;br /&gt;
&lt;br /&gt;
== Apache/mod_perl 1.x config for debug purposes ==&lt;br /&gt;
&lt;br /&gt;
This is for developers only and is no help for mortal users.&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;IfDefine PerlDProf&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;Perl&amp;amp;gt;&lt;br /&gt;
     use Apache::DB ();&lt;br /&gt;
     Apache::DB-&amp;amp;gt;init;&lt;br /&gt;
   &amp;amp;lt;/Perl&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   &amp;amp;lt;IfDefine !PerlSmallProf&amp;amp;gt;&lt;br /&gt;
     PerlModule Apache::DProf&lt;br /&gt;
   &amp;amp;lt;/IfDefine&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/IfDefine&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;IfDefine PerlStatus&amp;amp;gt;&lt;br /&gt;
   PerlModule Apache::Status&lt;br /&gt;
 &amp;amp;lt;/IfDefine&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;IfDefine PerlDBIProf&amp;amp;gt;&lt;br /&gt;
   PerlSetEnv DBI_PROFILE DBI::ProfileDumper::Apache&lt;br /&gt;
 &amp;amp;lt;/IfDefine&amp;amp;gt;&lt;br /&gt;
 PerlModule Apache::DBI&lt;br /&gt;
 &lt;br /&gt;
 ServerName XXXXXXXXXXXX&lt;br /&gt;
 DocumentRoot /opt/rt3/share/html&lt;br /&gt;
 Listen xxx.xxx.xxx.xxx:xxxxx&lt;br /&gt;
 &lt;br /&gt;
 AddDefaultCharset UTF-8&lt;br /&gt;
 &lt;br /&gt;
 ErrorLog /opt/rt3/var/log/mod_perl.httpd.error.log&lt;br /&gt;
 CustomLog /opt/rt3/var/log/mod_perl.httpd.access.log common&lt;br /&gt;
 &lt;br /&gt;
 PerlRequire /opt/rt3/bin/webmux.pl&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;Location /&amp;amp;gt;&lt;br /&gt;
   Options None&lt;br /&gt;
   SetHandler perl-script&lt;br /&gt;
   PerlHandler RT::Mason&lt;br /&gt;
   &amp;amp;lt;IfDefine PerlDProf&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;IfDefine PerlSmallProf&amp;amp;gt;&lt;br /&gt;
       PerlFixupHandler Apache::SmallProf&lt;br /&gt;
     &amp;amp;lt;/IfDefine&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/IfDefine&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/Location&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;Location /NoAuth/images&amp;amp;gt;&lt;br /&gt;
   SetHandler default-handler&lt;br /&gt;
 &amp;amp;lt;/Location&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;IfDefine PerlStatus&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;Location /perl-status&amp;amp;gt;&lt;br /&gt;
     SetHandler perl-script&lt;br /&gt;
     PerlHandler Apache::Status&lt;br /&gt;
     PerlSetVar StatusOptionsAll On&lt;br /&gt;
     PerlSetVar StatusTerse On&lt;br /&gt;
     PerlSetVar StatusTerseSize On&lt;br /&gt;
     PerlSetVar StatusTerseSizeMainSummary On&lt;br /&gt;
     PerlSetVar StatusLexInfo On&lt;br /&gt;
   &amp;amp;lt;/Location&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/IfDefine&amp;amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>