Making New RT Install accessible from example.com/rt when example.com/ hosts another website

I have been attempting to get RT installed and working to demo here at work. It looks like a great program, and I thought that I understood what needs to be done in order to get it working.

However, all of my attempts have failed.

I’ve successfully installed the RT files and made it all the way through the install guide I found here: http://requesttracker.wikia.com/wiki/ManualInstallation

Up to the RT_SiteConfig.pm part. Below is my RT_SiteConfig.pm file, the snippet from httpd.conf (I’ve tried so many different things I’m sure what is there now is just garbage, but I’m so aggravated I can’t go through that file right now) relevant to RT, and the perl.conf file that I really don’t know if it’s correct or not…

RT was installed to: /var/www/htdocs/base/bin/rt/
The other website hosted here lives at: /var/www/htdocs/
I need RT accessible at: http://www.example.com/rt

RT_SiteConfig.pm

Any configuration directives you include here will override

RT’s default configuration file, RT_Config.pm

To include a directive here, just copy the equivalent statement

from RT_Config.pm and change the value. We’ve included a single

sample value below.

This file is actually a perl module, so you can include valid

perl code, as well.

The converse is also true, if this file isn’t valid perl, you’re

going to run into trouble. To check your SiteConfig file, use

this comamnd:

perl -c /path/to/your/etc/RT_SiteConfig.pm

#Set( $rtname, ‘example.com’);
#Set(@Plugins,(qw(Extension::QuickDelete RT::FM)));

Set($DatabaseUser , ‘root’);
Set($DatabasePassword , ‘password’);

#$CorrespondAddress = ‘RT::CorrespondAddress.not.set’;
#$CommentAddress = ‘RT::CommentAddress.not.set’;

Set($MailCommand , ‘sendmailpipe’);
Set($SendmailArguments , “-oi -t”);
Set($SendmailPath , “/usr/sbin/sendmail”);

Set($UseFriendlyToLine , 0);
Set($WebPath , “/base/bin/rt”);
#Set($WebURL = ‘$WebBaseURL . $WebPath . “/”’);
Set($Timezone , ‘US/Eastern’);

1;

Httpd.conf
<VirtualHost *>
ServerAdmin user@domain.com
DocumentRoot /var/www/htdocs/base
ServerName www.example.net
CustomLog /var/log/httpd/access_log combined

    <Directory "/var/www/htdocs/base/bin/rt">
            Options Indexes FollowSymLinks
            Order allow,deny
            Allow from all
    </Directory>

Any help is greatly appreciated – I’m not new to *nix, nor am I new to computers, but this one just has me dumbfounded.

Thanks, I look forward to getting to use RT!

Mark Lewis

Intellifuel Systems, Inc.

1431 Chaffee Dr. Suite 6 | Titusville, FL 32780

office: 321-264-8707 x 241 | fax: 321-264-8709

markl@intellifuel.com

[cid:image1931e7.JPG@41086372.43982dc3]

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.

Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.

If you received this communication in error, please contact the sender and delete the material as well as all copies.

RT was installed to: /var/www/htdocs/base/bin/rt/
The other website hosted here lives at: /var/www/htdocs/
I need RT accessible at: http://www.example.com/rt

In your RT_SiteConfig.pm:
Set($WebPath, “/rt”);
Set($WebBaseURL, “http://www.example.com”);

In your Apache config, you wouldn’t set up a new VirtualHost directive,
you would put the RT config within the existing VirtualHost directive
for example.com. Something like this (check your docs and other
examples to confirm, this likely won’t be 100% correct):
<Directory “/var/www/htdocs/base/bin/rt”
Options FollowSymLinks ExecCGI
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt/bin/rt ← the actual rt
perl executable

RT was installed to: /var/www/htdocs/base/bin/rt/
The other website hosted here lives at: /var/www/htdocs/
I need RT accessible at: http://www.example.com/rt

In your RT_SiteConfig.pm:
Set($WebPath, “/rt”);
Set($WebBaseURL, “http://www.example.com”);

In your Apache config, you wouldn’t set up a new VirtualHost directive,
you would put the RT config within the existing VirtualHost directive
for example.com. Something like this (check your docs and other
examples to confirm, this likely won’t be 100% correct):
<Directory “/var/www/htdocs/base/bin/rt”
Options FollowSymLinks ExecCGI
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt/bin/rt ← the actual rt
perl executable

The above line is most certainly incorrect. The bin/rt that ships with
RT is the command-line utility, NOT the web interface handler.

Thomas

Nick,

Thanks for the reply.

I’m closer! I now get 403 Forbidden when I go to www.example.com/rt instead of a 404.

I corrected my RT_SiteConfig.pm file per your instruction, that makes sense to me now.

I removed all the virtual host crap, and added:

<Directory “/var/www/htdocs/base/bin/rt”>
Options FollowSymLinks
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt

So, now its 403’ing. I will continue to tinker but if you see something noticeably off here, your input is MUCH appreciated!!

Thanks again!

Mark Lewis
Intellifuel Systems, Inc.
1431 Chaffee Dr. Suite 6 | Titusville, FL 32780
office: 321-264-8707 x 241 | fax: 321-264-8709
markl@intellifuel.com

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.

Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.

If you received this communication in error, please contact the sender and delete the material as well as all copies.-----Original Message-----
From: Nick Kartsioukas [mailto:change+lists.rt@nightwind.net]
Sent: Tuesday, February 15, 2011 1:27 PM
To: Mark Lewis; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Making New RT Install accessible from example.com/rt when example.com/ hosts another website

On Tue, 15 Feb 2011 12:03 -0500, “Mark Lewis” markl@intellifuel.com wrote:

RT was installed to: /var/www/htdocs/base/bin/rt/
The other website hosted here lives at: /var/www/htdocs/
I need RT accessible at: http://www.example.com/rt

In your RT_SiteConfig.pm:
Set($WebPath, “/rt”);
Set($WebBaseURL, “http://www.example.com”);

In your Apache config, you wouldn’t set up a new VirtualHost directive,
you would put the RT config within the existing VirtualHost directive
for example.com. Something like this (check your docs and other
examples to confirm, this likely won’t be 100% correct):
<Directory “/var/www/htdocs/base/bin/rt”
Options FollowSymLinks ExecCGI
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt/bin/rt ← the actual rt
perl executable

Thomas,

Thanks for your reply! I changed it to /var/www/htdocs/base/bin/rt and left off the additional /bin/rt.

Thanks again!

Mark Lewis
Intellifuel Systems, Inc.
1431 Chaffee Dr. Suite 6 | Titusville, FL 32780
office: 321-264-8707 x 241 | fax: 321-264-8709
markl@intellifuel.com

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.

Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.

If you received this communication in error, please contact the sender and delete the material as well as all copies.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas Sibley
Sent: Tuesday, February 15, 2011 1:38 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Making New RT Install accessible from example.com/rt when example.com/ hosts another website

On 15 Feb 2011 13:27, Nick Kartsioukas wrote:

On Tue, 15 Feb 2011 12:03 -0500, “Mark Lewis” markl@intellifuel.com wrote:

RT was installed to: /var/www/htdocs/base/bin/rt/
The other website hosted here lives at: /var/www/htdocs/
I need RT accessible at: http://www.example.com/rt

In your RT_SiteConfig.pm:
Set($WebPath, “/rt”);
Set($WebBaseURL, “http://www.example.com”);

In your Apache config, you wouldn’t set up a new VirtualHost directive,
you would put the RT config within the existing VirtualHost directive
for example.com. Something like this (check your docs and other
examples to confirm, this likely won’t be 100% correct):
<Directory “/var/www/htdocs/base/bin/rt”
Options FollowSymLinks ExecCGI
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt/bin/rt ← the actual rt
perl executable

The above line is most certainly incorrect. The bin/rt that ships with
RT is the command-line utility, NOT the web interface handler.

Thomas

Maybe file permissions? Root seems to own everything in the RT directory, with different groups…is that how it’s supposed to be?

[root@host2011 bin]# pwd ; ls -lash | grep rt
/var/www/htdocs/base/bin
4.0K drwxr-xr-x 9 apache apache 4.0K Feb 8 17:27 rt

[root@host2011 rt]# pwd ; ls -lash
/var/www/htdocs/base/bin/rt
total 36K
4.0K drwxr-xr-x 9 apache apache 4.0K Feb 8 17:27 .
4.0K drwxrwx— 24 apache apache 4.0K Feb 8 17:19 …
4.0K drwxr-xr-x 2 root root 4.0K Feb 9 12:56 bin
4.0K drwxr-xr-x 2 root rt 4.0K Feb 9 12:56 etc
4.0K drwxr-xr-x 3 root bin 4.0K Feb 9 12:56 lib
4.0K drwxr-xr-x 7 root root 4.0K Feb 8 17:27 local
4.0K drwxr-xr-x 2 root root 4.0K Feb 9 12:56 sbin
4.0K drwxr-xr-x 5 root root 4.0K Feb 8 17:27 share
4.0K drwxr-xr-x 5 root root 4.0K Feb 8 17:27 varFrom: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Mark Lewis
Sent: Tuesday, February 15, 2011 2:39 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Making New RT Install accessible from example.com/rt when example.com/ hosts another website

Nick,

Thanks for the reply.

I’m closer! I now get 403 Forbidden when I go to www.example.com/rt instead of a 404.

I corrected my RT_SiteConfig.pm file per your instruction, that makes sense to me now.

I removed all the virtual host crap, and added:

<Directory “/var/www/htdocs/base/bin/rt”>
Options FollowSymLinks
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt

So, now its 403’ing. I will continue to tinker but if you see something noticeably off here, your input is MUCH appreciated!!

Thanks again!

Mark Lewis
Intellifuel Systems, Inc.
1431 Chaffee Dr. Suite 6 | Titusville, FL 32780
office: 321-264-8707 x 241 | fax: 321-264-8709
markl@intellifuel.com

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.

Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.

If you received this communication in error, please contact the sender and delete the material as well as all copies.

I removed all the virtual host crap, and added:


<Directory “/var/www/htdocs/base/bin/rt”>
Options FollowSymLinks
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt

So, now its 403’ing. I will continue to tinker but if you see something noticeably off here, your input is MUCH appreciated!!

RT’s web handler is not the install directory.

You want to remove what you added above and replace it with:

as RT is out of document root then we want alias

and should define directory access

Alias /rt/ /opt/rt3/share/html/
<Directory /opt/rt3/share/html/>
Order allow,deny
Allow from all

PerlRequire /opt/rt3/bin/webmux.pl
<Location /rt/>
AddDefaultCharset UTF-8
SetHandler perl-script
PerlHandler RT::Mason

Adjust paths accordingly for your install (i.e. /opt/rt3/ should be
replaced by /var/www/htdocs/base/bin/rt/).

Thomas

Thank you, Thomas. I now get a login page.

I believe it’s all working now, thanks everyone for the help.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas Sibley
Sent: Tuesday, February 15, 2011 3:10 PM
To: RT Users
Subject: Re: [rt-users] Making New RT Install accessible from example.com/rt when example.com/ hosts another website

On 15 Feb 2011 14:38, Mark Lewis wrote:

I removed all the virtual host crap, and added:


<Directory “/var/www/htdocs/base/bin/rt”>
Options FollowSymLinks
AllowOverride None

ScriptAlias /rt /var/www/htdocs/base/bin/rt

So, now its 403’ing. I will continue to tinker but if you see something noticeably off here, your input is MUCH appreciated!!

RT’s web handler is not the install directory.

You want to remove what you added above and replace it with:

as RT is out of document root then we want alias

and should define directory access

Alias /rt/ /opt/rt3/share/html/
<Directory /opt/rt3/share/html/>
Order allow,deny
Allow from all

PerlRequire /opt/rt3/bin/webmux.pl
<Location /rt/>
AddDefaultCharset UTF-8
SetHandler perl-script
PerlHandler RT::Mason

Adjust paths accordingly for your install (i.e. /opt/rt3/ should be
replaced by /var/www/htdocs/base/bin/rt/).

Thomas