Question on apache config

Hi,

I’ve installed RT and it’s working fine but if I install it on a server running any other web sites, it breaks those web sites. I’d really like to put this on the same box that runs nagios but nagios breaks as soon as I do that. The logs are throwing mason errors when I try to load the nagios page because it is trying to use RT’s perl configuration for everything. I’m using the default RT apache config and the default nagios config. Nagios does not use a virtual host. I’ve never been great with apache configs and I suspect this is something really simple like changing a host name or IP address in the virtual host but I’m not sure. Any thoughts or ideas would be appreciated. Thank you.

This e-mail and any attachments are confidential, may contain legal,
professional or other privileged information, and are intended solely for the
addressee. If you are not the intended recipient, do not use the information
in this e-mail in any way, delete this e-mail and notify the sender. CEG-IP2

Do you have RT setup as a separate virtualhost?

This is how our config looks a.t.m. for a specific vhost for RT, but it’s
the only vhost so we have the IP set to *. I assume you have a separate
hostname for RT?!

<VirtualHost *:80>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

<VirtualHost *:443>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

LogLevel debug

AddDefaultCharset UTF-8

DocumentRoot “/opt/rt4/share/html”

Order allow,deny
Allow from all

SetHandler perl-script
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


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

SSLEngine on
SSLCertificateFile /etc/ssl/certs/rt.example.com-cert.pem

If you reserve a different hostname for RT then this should work quite well.

– Bart

Op 30 november 2011 15:12 schreef Greenberg, Joshua L <
Joshua.Greenberg@constellation.com> het volgende:

I managed to get this to work without a separate virtual host for each.
We have nagios, rt, the nagios rt interface for when something irksome
comes up when the office is closed, and an intra-office website. Works
really well, tho we have a smaller setup. This way its just domain/
for the web doman/rt and domain/nagios.

Hope this helps. Tho a simple virtual host for a nagios.domain.tld
would work just as well.

-Matt

----------------conf----------------
<VirtualHost 0:80>
ServerName server.place.tld
ServerAdmin lab@pacbell.net

     ErrorLog /var/log/apache2.error
     TransferLog /var/log/apache2.access
     LogLevel debug

     DocumentRoot /var/www

<Directory /var/www>
Order allow,deny
Allow from all

<Location /rt>
Order allow,deny
Allow from all

         SetHandler perl-script
         PerlResponseHandler Plack::Handler::Apache2
         PerlSetVar psgi_app /opt/rt4/sbin/rt-server
use Plack::Handler::Apache2; Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");

<Directory “/usr/local/nagios/sbin”>
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /place/to/look
Require valid-user

Alias /nagios “/usr/local/nagios/share”

<Directory “/usr/local/nagios/share”>
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /place/to/look
Require valid-user

----------------eof----------------On 11/30/2011 6:25 AM, Bart wrote:

Do you have RT setup as a separate virtualhost?

This is how our config looks a.t.m. for a specific vhost for RT, but
it’s the only vhost so we have the IP set to *. I assume you have a
separate hostname for RT?!

<VirtualHost *:80>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

<VirtualHost *:443>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

LogLevel debug

AddDefaultCharset UTF-8

DocumentRoot “/opt/rt4/share/html”

Order allow,deny
Allow from all

SetHandler perl-script
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


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

SSLEngine on
SSLCertificateFile /etc/ssl/certs/rt.example.com-cert.pem

If you reserve a different hostname for RT then this should work quite
well.

– Bart

Op 30 november 2011 15:12 schreef Greenberg, Joshua L
<Joshua.Greenberg@constellation.com
mailto:Joshua.Greenberg@constellation.com> het volgende:

Hi,

I've installed RT and it's working fine but if I install it on a
server running any other web sites, it breaks those web sites. I'd
really like to put this on the same box that runs nagios but
nagios breaks as soon as I do that. The logs are throwing mason
errors when I try to load the nagios  page because it is trying to
use RT's perl configuration for everything. I'm using the default
RT apache config and the default nagios config. Nagios does not
use a virtual host. I've never been great with apache configs and
I suspect this is something really simple like changing a host
name or IP address in the virtual host but I'm not sure. Any
thoughts or ideas would be appreciated. Thank you.

>>> This e-mail and any attachments are confidential, may contain
legal,
professional or other privileged information, and are intended
solely for the
addressee.  If you are not the intended recipient, do not use the
information
in this e-mail in any way, delete this e-mail and notify the
sender. CEG-IP2


--------
RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston --- TBA

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Boston — TBA