3.8.8 -> 4.0.1, PSGI upgrade/usage problem

I’ve got everything up to the web services upgraded with no problems,
and here I’m having some trouble - I think I’d have had the same
troubles if this were 3.9, as I believe it’s related to PSGI. My
apologies for the craptacular formatting of these errors.

The error(s):

[Tue Jul 12 12:01:01 2011] [error] Your request path is ‘/rt/index.html’
and it doesn’t match your Location(Match) ‘/opt/rt4/share/html/’. This
should be due to the configuration error. See perldoc Plack::Hand
ler::Apache2 for details.
[Tue Jul 12 16:01:01 2011] [warn]: The actual SCRIPT_NAME
(/rt/index.html) does NOT match the configured WebPath (/rt). Perhaps
you should Set($WebPath, ‘/rt/index.html’); in RT_SiteConfig.pm,
otherwise your i
nternal links may be broken. (/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:1097)
[Tue Jul 12 12:01:04 2011] [error] Your request path is
’/rt/NoAuth/css/aileron-squished-faf83ae7ba84ca0d5a0280fd7c2e6b66.css’
and it doesn’t match your Location(Match) ‘/opt/rt4/share/html/’. This
should be d
ue to the configuration error. See perldoc Plack::Handler::Apache2 for
details.
[Tue Jul 12 12:01:04 2011] [error] Your request path is
’/rt/NoAuth/js/squished-0d827a85fc350fae22bf999015a8d153.js’ and it
doesn’t match your Location(Match) ‘/opt/rt4/share/html/’. This should
be due to the
configuration error. See perldoc Plack::Handler::Apache2 for details.
[Tue Jul 12 12:01:04 2011] [error] Your request path is
’/rt/NoAuth/RichText/ckeditor.js’ and it doesn’t match your
Location(Match) ‘/opt/rt4/share/html/’. This should be due to the
configuration error. See pe
rldoc Plack::Handler::Apache2 for details.
[Tue Jul 12 16:01:04 2011] [warn]: The actual SCRIPT_NAME
(/rt/NoAuth/js/squished-0d827a85fc350fae22bf999015a8d153.js) does NOT
match the configured WebPath (/rt). Perhaps you should Set($WebPath,
’/rt/NoAuth/
js/squished-0d827a85fc350fae22bf999015a8d153.js’); in RT_SiteConfig.pm,
otherwise your internal links may be broken.
(/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:1097)
[Tue Jul 12 16:01:04 2011] [warn]: The actual SCRIPT_NAME
(/rt/NoAuth/css/aileron-squished-faf83ae7ba84ca0d5a0280fd7c2e6b66.css)
does NOT match the configured WebPath (/rt). Perhaps you should
Set($WebPath, ‘/
rt/NoAuth/css/aileron-squished-faf83ae7ba84ca0d5a0280fd7c2e6b66.css’);
in RT_SiteConfig.pm, otherwise your internal links may be broken.
(/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:1097)
[Tue Jul 12 16:01:04 2011] [warn]: The actual SCRIPT_NAME
(/rt/NoAuth/RichText/ckeditor.js) does NOT match the configured WebPath
(/rt). Perhaps you should Set($WebPath,
’/rt/NoAuth/RichText/ckeditor.js’); in
RT_SiteConfig.pm, otherwise your internal links may be broken.
(/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:1097)
[Tue Jul 12 12:01:04 2011] [error] Your request path is
’/rt/NoAuth/Login.html’ and it doesn’t match your Location(Match)
’/opt/rt4/share/html/’. This should be due to the configuration error.
See perldoc Plac
k::Handler::Apache2 for details.

It then continues quite a bit after that with similar (or the same) errors.

RT is set to run from /rt off the web server, and the configuration is
below (modified from the RT3 one that worked, but with the new handler
and whatnot I have no idea if this is right). This is the contents of
the /etc/httpd/conf.d/rt4.conf file

Alias /rt "/opt/rt4/share/html/"
LDAPVerifyServerCert off

<Directory “/opt/rt4/share/html/”>

AllowOverride All
Options ExecCGI +FollowSymLinks

AuthLDAPURL ldaps://<>
require valid-user
AuthzLDAPAuthoritative off
AuthBasicProvider ldap
AuthType Basic
AuthName “Peyton UNIX Systems”

RewriteEngine On
RedirectMatch permanent (.*)/$ $1/index.html
AddDefaultCharset UTF-8
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server

<Directory “/opt/rt4/share/html/REST/1.0/NoAuth”>
AllowOverride None
Satisfy Any

<Directory “/opt/rt4/share/html/NoAuth”>
AllowOverride None
Satisfy Any

use Plack::Handler::Apache2; Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");

I’m running Apache 2.2.3 on CentOS 5.5 with a freshly installed RT 4.0.1
pointed to an upgraded RT3 database (copied the database & performed the
upgrade steps from the docs).

NB: I removed the RedirectMatch up there since I saw it wasn’t in the
new documentation for the web interface, but all that did was change the
error message(s) to this:
[Tue Jul 12 12:11:45 2011] [error] Your request path is ‘/rt/’ and it
doesn’t match your Location(Match) ‘/opt/rt4/share/html/’. This should
be due to the configuration error. See perldoc Plack::Handler::Apache2
for details.
[Tue Jul 12 16:11:45 2011] [warn]: The actual SCRIPT_NAME (/rt/) does
NOT match the configured WebPath (/rt). Perhaps you should Set($WebPath,
’/rt/’); in RT_SiteConfig.pm, otherwise your internal links may be
broken. (/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:1097)

Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
Princeton University | ICBM Address: 40.346525 -74.651285
206 Peyton Hall |“On my ship, the Rocinante, wheeling through
Princeton, NJ 08544 | the galaxies; headed for the heart of Cygnus,
(267) 793-0852 | headlong into mystery.” -Rush, ‘Cygnus X-1’

I’ve got everything up to the web services upgraded with no problems,
and here I’m having some trouble - I think I’d have had the same
troubles if this were 3.9, as I believe it’s related to PSGI. My
apologies for the craptacular formatting of these errors.

You should read docs/web_deployment.pod either from your RT 4 source
tarball or
rt/docs/web_deployment.pod at stable · bestpractical/rt · GitHub.
It has a number of sample configurations that you should start from
rather than your RT 3 config. I suggest you get one of the sample
configs working and then add in your other directives as necessary.

Thomas

You should read docs/web_deployment.pod either from your RT 4 source
tarball or
rt/docs/web_deployment.pod at stable · bestpractical/rt · GitHub.
It has a number of sample configurations that you should start from
rather than your RT 3 config. I suggest you get one of the sample
configs working and then add in your other directives as necessary.

Thanks, that’s what I did; but some of the directives I’m not sure
about. The LDAP bits I still need (since I’m using HTTP authentication
for RT), and aren’t mentioned in that document. I can’t use the pure
virtualhost directive as listed because there is no virtual host on the
machine. And I believe the two noauth parts are needed to bypass
external authentication for rt-mailgate and the like.

Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
Princeton University | ICBM Address: 40.346525 -74.651285
206 Peyton Hall |“On my ship, the Rocinante, wheeling through
Princeton, NJ 08544 | the galaxies; headed for the heart of Cygnus,
(267) 793-0852 | headlong into mystery.” -Rush, ‘Cygnus X-1’

You should read docs/web_deployment.pod either from your RT 4 source
tarball or
rt/docs/web_deployment.pod at stable · bestpractical/rt · GitHub.
It has a number of sample configurations that you should start from
rather than your RT 3 config. I suggest you get one of the sample
configs working and then add in your other directives as necessary.

Thanks, that’s what I did; but some of the directives I’m not sure
about. The LDAP bits I still need (since I’m using HTTP authentication
for RT), and aren’t mentioned in that document. I can’t use the pure
virtualhost directive as listed because there is no virtual host on the
machine. And I believe the two noauth parts are needed to bypass
external authentication for rt-mailgate and the like.

I suspect you don’t want that Alias /rt line and the Directory
“/opt/rt4/share/html/” block should probably be a Location /rt block
instead.

Thomas

The solution was to replace the “Directory” directives with “Location"
and make them URI relative; ie, <Location “/rt”>, <Location
”/rt/NoAuth">, etc. Assuming mailgate is OK with this too (I’ll know
shortly) this seems solved.

Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
Princeton University | ICBM Address: 40.346525 -74.651285
206 Peyton Hall |“On my ship, the Rocinante, wheeling through
Princeton, NJ 08544 | the galaxies; headed for the heart of Cygnus,
(267) 793-0852 | headlong into mystery.” -Rush, ‘Cygnus X-1’