"Ordinary" CGI-Scripts don't work after installing RT2

I have installed RT2 and it is working very well. But now I find that ordinary perl scripts placed in my cgi-bin directory that worked before I setup my virtual server for RT2 no longer run. I thought that the directory has probably just moved - but I cant see any obvious alternatives under my /opt/rt2 path. If I comment out the Virtual host settings for RT the server foinds my scripts again.

Please can anyone suggest what I might have done wrong. Extract from my httpd.conf follows:

VirtualHost 192.168.150.251>
DocumentRoot /opt/rt2/WebRT/html

ServerName citypack.city.lnk
PerlModule Apache::DBI
PerlRequire /opt/rt2/bin/webmux.pl

SetHandler perl-script
PerlHandler RT::Mason

Thanks in advance

Alec Cormack
email: Alec.cormack@city-link.co.uk

The information contained in this e-mail is intended only for the
individual to whom it is addressed. It may contain privileged and
confidential information. If you have received this message in
error or there are any problems, please notify the sender
immediately and delete the message from your computer. The
unauthorised use, disclosure, copying or alteration of this
message is forbidden. This message has been checked for all
known viruses by Initial City Link prior to sending.

This is more of an Apache and Mason question, but here you go:

  1. You don’t have a ScriptAlias in there for your cgi-bin
  2. After you put that in, Mason will still try to handle all your requests.
    I’d put a
    <FilesMatch “*.html”>
    SetHandler perl-script
    PerlHandler RT::Mason

    instead of your tags. I’ve not had problems with that.
  3. If that is your only IP, then once you put that VirtualHost in there,
    directives in there will override everything else in your httpd.conf file.

See Documentation: Apache HTTP Server - The Apache HTTP Server Project for more information.

-Josh Krikke-----Original Message-----
From: rt-users-admin@lists.fsck.com [mailto:rt-users-admin@lists.fsck.com]On
Behalf Of Alec Cormack
Sent: Thursday, November 01, 2001 12:50 AM
To: rt-users@lists.fsck.com
Subject: [rt-users] “Ordinary” CGI-Scripts don’t work after installing RT2

I have installed RT2 and it is working very well. But now I find that
ordinary perl scripts placed in my cgi-bin directory that worked before I
setup my virtual server for RT2 no longer run. I thought that the directory
has probably just moved - but I cant see any obvious alternatives under my
/opt/rt2 path. If I comment out the Virtual host settings for RT the server
foinds my scripts again.

Please can anyone suggest what I might have done wrong. Extract from my
httpd.conf follows:

VirtualHost 192.168.150.251>
DocumentRoot /opt/rt2/WebRT/html

ServerName citypack.city.lnk
PerlModule Apache::DBI
PerlRequire /opt/rt2/bin/webmux.pl

SetHandler perl-script
PerlHandler RT::Mason

Thanks in advance

Alec Cormack
email: Alec.cormack@city-link.co.uk

The information contained in this e-mail is intended only for the
individual to whom it is addressed. It may contain privileged and
confidential information. If you have received this message in
error or there are any problems, please notify the sender
immediately and delete the message from your computer. The
unauthorised use, disclosure, copying or alteration of this
message is forbidden. This message has been checked for all
known viruses by Initial City Link prior to sending.

Josh Krikke is quoted as saying:

This is more of an Apache and Mason question, but here you go:

  1. You don’t have a ScriptAlias in there for your cgi-bin
  2. After you put that in, Mason will still try to handle all your requests.
    I’d put a
    <FilesMatch “*.html”>
    SetHandler perl-script
    PerlHandler RT::Mason

    instead of your tags. I’ve not had problems with that.
  3. If that is your only IP, then once you put that VirtualHost in there,
    directives in there will override everything else in your httpd.conf file.

This works great, except when users send in attachments. How can I set this
up so Mason handles everything except cgi scripts?

darren

I’ve since added some to it. This handles attachments as well. I don’t
know if it has any performance issues… Here’s a new excerpt:
<FilesMatch “.html">
SetHandler perl-script
PerlHandler RT::Mason

<LocationMatch "/
/Attachment”>
SetHandler perl-script
PerlHandler RT::Mason

This location directive is just another regex. Come to think of it,
something like this should work for anything not in cgi-bin:

     <LocationMatch "!^/cgi-bin/$">  #not sure about the regex syntax

here
SetHandler perl-script
PerlHandler RT::Mason

I don’t have time to try it right now, but I might try it in the next few
days. I’ll let everyone know if no one else does.

-Josh