Problem getting started on FreeBSD

Hello all,

I’m having trouble setting up RT 4.4.3 (installed from FreeBSD ports). The problem is that RT sends the login form in response to any request, including for CSS and JS files.

My web server is Apache 2.4, with mod_proxy_fcgi. Running the standalone rt_server works correctly.

The pertinent part of the Apache config is:

<VirtualHost *:80>
...
    # This directory is guaranteed empty and unmodifiable.
    DocumentRoot "/var/empty"

    ProxyFCGIBackendType GENERIC
    ProxyPass "/" \
        "unix:/var/run/rt-fcgi/rt-server.fcgi|fcgi://localhost/rt-server/"

    <Proxy "*">
        Require all granted
    </Proxy>

    <Location "/">
        Require all granted
    </Location>

</VirtualHost>

I run rt-server.fcgi via spawn-fcgi:

/usr/local/bin/spawn-fcgi -s /var/run/rt-fcgi/rt-server.fcgi -M 600 -n -u rt -g rt -U www -G www -- /usr/local/sbin/rt-server.fcgi

The FreeBSD port somehow causes RT to put temporary files (“mason_data”/“session_data”) into /var/run/rt44. By default, this directory and its contents belong to the web server user. Because that is not correct in the case of a standalone FastCGI application that is not controlled by the web server, I have made sure that everything now belongs to the “rt” user and is readable and writable for that account. The same for /usr/local/share/rt44, where the port apparently puts the “permanent” files.

My RT_SiteConfig.pm:

Set( $rtname, 'rt.chrullrich.net');
Set($Organization, 'chrullrich.net');
Set($CorrespondAddress, 'rt@rt.chrullrich.net');
Set($CommentAddress,  'rt@rt.chrullrich.net');

Set($WebDomain, 'rt.chrullrich.net');

As soon as as the first request arrives, I get this message in the log:

[warning]: The requested path (‘/’) does NOT match the configured WebPath (). Perhaps you should Set($WebPath, ‘/’ in RT_SiteConfig.pm, otherwise your internal hyperlinks may be broken. (/usr/local/lib/perl5/site_perl/RT/Interface/Web.pm:1344)

I have read up on the message, but I cannot find a way to correct it.

Thanks for any help.

What happens if you put Set($WebPath, ‘/’); into your local RT_SiteConfig.pm as the warning in the log suggests? Don’t forget to clear the Mason cache and restart the server when doing so.

[error]: For the WebPath config option, use the empty string instead of / (/usr/local/lib/perl5/site_perl/RT/Config.pm:888)

RT doesn’t ship with instructions for deploying on mod_proxy_fcgi, only
mod_fastcgi and mod_fcgid. I’m also not aware of a standard
mod_proxy_fcgi configuration.

A brif skim of its documentation suggests that the following
additional Apache configuration may resolve it:

SetEnvIf Request_URI . proxy-fcgi-pathinfo=1

Please report your results back here so we can add to the standard
configurations, if it works.

  • Alex
1 Like

Yes, at first glance, it looks like it works. The stylesheets etc. are loaded correctly.

I see now that I might have divined this from the nginx sample configuration, but since that is the only place in the documentation that even mentions PATH_INFO at all, and it is not something I would have thought of myself in a million years, I did not.

Thanks for the hint!