[rt-users] Apache + .htaccess + mod_rewrite: avoiding WebPath configuration warnings

Alex Peters alex at peters.net
Sat Sep 27 10:30:55 EDT 2014


I'm in the unfortunate position of having to maintain an RT instance on a
shared host, where Apache and .htaccess are the only choice.  Moreover, due
to the way the shared host operates, processes are frequently killed
causing RT to restart frequently.

Consequently, the log is getting spammed with this:

[30928] [Sat Sep 27 07:10:35 2014] [warning]: The requested path
(/dispatch.fcgi) does NOT match the configured WebPath ().  Perhaps you
should Set($WebPath, '/dispatch.fcgi'); in RT_SiteConfig.pm, otherwise your
internal links may be broken. (.../RT/Interface/Web.pm:1324)

Apache + .htaccess + mod_rewrite is not advertised in web_deployment.pod as
a recommended way of deployment, but surely others on this list have had to
go down this path and hopefully some have found a way to avoid this log
message from being generated.  I probably don't have an ideal .htaccess
file in place.

Here are my .htaccess bits.  Any pointers would be gratefully received.

Options +ExecCGI
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L]

For what it's worth, this is the dispatch.fcgi content:

#!/home/rt/opt/perl-5.20.1/bin/perl
use Plack::Handler::FCGI ();
use Plack::Builder 'builder';
Plack::Handler::FCGI->new->run(builder {
    do '.../rt-4.2.7/sbin/rt-server.fcgi';
});

WebPath is set to an empty string because RT is served from the domain's
root level.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140928/d056b1fb/attachment.htm>


More information about the rt-users mailing list