title: Request Tracker 4.4.1 with Apache2
body: <p>I installed RT4 and it is working. I am now trying to run RT with Apache2. I am using Centos 6.8</p>
  
  <p>For now I don't care which method I use: mod_perl, fastcgi or fcgid. Just want to see it working.</p>
  
  <p>If I use mod_perl config, I get an error when I restart the apache.</p>
  
  <p>/etc/httpd/conf/httpd.conf:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  # This first-listed virtual host is also the default for *:80
  ServerName ittickets.domain.local
  AddDefaultCharset UTF-8
      DocumentRoot "/opt/rt4/share/html"
      &lt;Location /rt&gt;
          &lt;IfVersion &gt;= 2.4&gt;
              Require all granted
          &lt;/IfVersion&gt;
          &lt;IfVersion &lt; 2.4&gt;
              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("/opt/rt4/sbin/rt-server");
      &lt;/Perl&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Starting httpd: [8891] [Mon Oct 10 13:07:49 2016] [warning]: DBI connect('dbname=rt4;host=srv-db.domain.local','rt_user',...) failed: Can't connect to MySQL server on 'srv-db.domain.local' (13) at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 105. (/usr/local/share/perl5/Carp.pm:169)
  
  RT couldn't connect to the database where tickets are stored.
  If this is a new installation of RT, you should visit the URL below
  to configure RT and initialize your database.
  
  If this is an existing RT installation, this may indicate a database
  connectivity problem.
  
  The error RT got back when trying to connect to your database was:
  
  Connect Failed Can't connect to MySQL server on 'srv-db.domain.local' (13)
   at /opt/rt4/sbin/../lib/RT.pm line 216.
  
  [8891] [Mon Oct 10 13:07:50 2016] [warning]: DBI connect('dbname=rt4;host=srv-db.domain.local','rt_user',...) failed: Can't connect to MySQL server on 'srv-db.domain.local' (13) at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 105. (/usr/local/share/perl5/Carp.pm:169)
  </code></pre>
  
  <p>But, there is no problem connecting to the database with rt_user.</p>
  
  <p>If i visit  <a href="http://ittickets.domain.local" rel="nofollow">http://ittickets.domain.local</a>, I get this message:</p>
  
  <pre><code>You're almost there!
  You haven't yet configured your webserver to run RT. You appear to have installed RT's web interface correctly, but haven't yet configured your web server to "run" the RT server which powers the web interface. The next step is to edit your webserver's configuration file to instruct it to use RT's mod_perl or FastCGI handler. If you need commercial support, please contact us at sales@bestpractical.com. 
  </code></pre>
  
  <p>RT config /opt/rt4/etc/RT_SiteConfig.pm:</p>
  
  <pre><code>Set($rtname, 'domain.local');
  Set($Organization, 'ittickets.domain.local');
  Set($WebPort, 80);
  Set($WebDomain, 'ittickets.domain.local');
  Set($WebPath, '/rt');
  Set(@ReferrerWhitelist, qw(ittickets.domain.local));
  
  ### MYSQL Config
  Set($DatabaseType, "mysql");
  Set($DatabaseHost,   "srv-db.domain.local");
  Set($DatabaseRTHost, "srv-rt.domain.local");
  Set($DatabasePort, "");
  Set($DatabaseUser, "rt_user");
  Set($DatabasePassword, q{xxxxxxxxxxx});
  Set($DatabaseName, q{rt4});
  </code></pre>
  
  <p>I tried all the configurations found on the Internet. I don't understand what I do wrong. Can someone give a hint, please?</p>