I'm so close now....but it's always selecting brandy (the new brand). I'm sure it's something small and simply that I'm missing now. I really appreciate your help so far.<br><br>I know the whole brandx, brandy thing is a little confusing. I've double checked all of the refences below, and brandx and brandy are used the correct spots in each code snippet below.<br>
<br>Here is the output of the foo file that shows that the ENV variables are being set:<br><br><a href="http://tickets.brandy.com">tickets.brandy.com</a> <<a href="http://tickets.brandy.com">http://tickets.brandy.com</a>><br>
<a href="http://tickets.brandx.com">tickets.brandx.com</a> <<a href="http://tickets.brandx.com">http://tickets.brandx.com</a>><br><a href="http://tickets.brandy.com">tickets.brandy.com</a> <<a href="http://tickets.brandy.com">http://tickets.brandy.com</a>><br>
<a href="http://tickets.brandx.com">tickets.brandx.com</a> <<a href="http://tickets.brandx.com">http://tickets.brandx.com</a>><br><a href="http://tickets.brandy.com">tickets.brandy.com</a> <<a href="http://tickets.brandy.com">http://tickets.brandy.com</a>><br>
<a href="http://tickets.brandx.com">tickets.brandx.com</a> <<a href="http://tickets.brandx.com">http://tickets.brandx.com</a>><br><a href="http://tickets.brandy.com">tickets.brandy.com</a> <<a href="http://tickets.brandy.com">http://tickets.brandy.com</a>><br>
<a href="http://tickets.brandx.com">tickets.brandx.com</a> <<a href="http://tickets.brandx.com">http://tickets.brandx.com</a>><br><a href="http://tickets.brandy.com">tickets.brandy.com</a> <<a href="http://tickets.brandy.com">http://tickets.brandy.com</a>><br>
<a href="http://tickets.brandx.com">tickets.brandx.com</a> <<a href="http://tickets.brandx.com">http://tickets.brandx.com</a>><br><br>I've double checked the httpd.conf file, inside of the brandy site, we have<br>
PerlRequire /opt/rt3/bin/webmux-brandy.pl<br><br>Inside of the brandx site, we have<br>PerlRequire /opt/rt3/bin/webmux.pl<br><br>Here's my webmux.pl changes for the old brand:<br>#This drags in RT's <a href="http://config.pm">config.pm</a><br>
BEGIN {<br> $ENV{'SERVER'} = '<a href="http://tickets.brandx.com">tickets.brandx.com</a> <<a href="http://tickets.brandx.com">http://tickets.brandx.com</a>>';<br> RT::LoadConfig();<br> if ($RT::DevelMode) { require Module::Refresh; }<br>
}<br><br>Here's my webmux-brandy.pl changes for the old brand:<br>#This drags in RT's <a href="http://config.pm">config.pm</a><br>BEGIN {<br> $ENV{'SERVER'} = '<a href="http://tickets.brandy.com">tickets.brandy.com</a> <<a href="http://tickets.brandy.com">http://tickets.brandy.com</a>>';<br>
RT::LoadConfig();<br> if ($RT::DevelMode) { require Module::Refresh; }<br>}<br><br>This is my RT.pm LoadConfig sub, right before it stats and loads the site config file:<br>my $ser = $ENV{'SERVER'} ;<br>open F, ">> /tmp/foo" ;<br>
print F "$ser \n";<br>close F;<br><br>if ($ENV{'SERVER'} eq "<a href="http://tickets.brandy.com">tickets.brandy.com</a> <<a href="http://tickets.brandy.com">http://tickets.brandy.com</a>>") {<br>
$SITE_CONFIG_FILE = '/opt/rt3/etc/RT_SiteConfig-Refense.pm' ;<br>}<br>if ($ENV{'SERVER'} eq "<a href="http://tickets.brandx.com">tickets.brandx.com</a> <<a href="http://tickets.brandx.com">http://tickets.brandx.com</a>>") {<br>
$SITE_CONFIG_FILE = '/opt/rt3/etc/RT_SiteConfig.pm' ;<br>}<br><br><br clear="all">Sincerely,<br>Doug Eubanks<br><a href="mailto:admin@dougware.net">admin@dougware.net</a><br>
<br><br><div class="gmail_quote">On Tue, Feb 24, 2009 at 9:53 AM, Raed El-Hames <span dir="ltr"><<a href="mailto:rfh@vialtus.com">rfh@vialtus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sorry Doug my mistake its been a long time since I did this:<br>
we set :<br>
$ENV{'SERVER'} = '<a href="http://my_brandx_instance.com" target="_blank">my_brandx_instance.com</a> <<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>> in the relavent webmux-brandx.pl , it would n't have existed before ..<br>
The best bet to see if its loaded into ENV is by adding a print statement in RT.pm LoadConfig, looking at my dev code I think I managed to do something like<br>
sub LoadConfig {<br>
<br>
my $ser = $ENV{'SERVER'} ;<br>
open F, ">> /opt/rt3/bin/foo" ;<br>
print F "$ser \n";<br>
close F;<div class="Ih2E3d"><br>
<br>
if ($ENV{'SERVER'} eq '<a href="http://my_brandx_instance.com" target="_blank">my_brandx_instance.com</a> <<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>>' ) {<br>
$SITE_CONFIG_FILE = '/opt/rt3/local/etc/RT_SiteConfig_brandx.pm' ;<br>
}<br>
<br></div>
I think at the time of restarting apache something will be written to the foo file<br>
<br>
Roy<br>
<br>
Doug Eubanks wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
Here is my relevant httpd.conf sections....I've sanitized the hostnames......<br>
<br>
<VirtualHost *:80><br>
CacheEnable disk /<br></div>
ServerAdmin <a href="mailto:support@brandy.com" target="_blank">support@brandy.com</a> <mailto:<a href="mailto:support@brandy.com" target="_blank">support@brandy.com</a>><div class="Ih2E3d"><br>
DocumentRoot /opt/rt3/share/html<br></div>
ServerName <a href="http://tickets.brandy.com" target="_blank">tickets.brandy.com</a> <<a href="http://tickets.brandy.com" target="_blank">http://tickets.brandy.com</a>><br>
ServerAlias <a href="http://tickets.brandy.com" target="_blank">tickets.brandy.com</a> <<a href="http://tickets.brandy.com" target="_blank">http://tickets.brandy.com</a>> <a href="http://tickets2.brandy.com" target="_blank">tickets2.brandy.com</a> <<a href="http://tickets2.brandy.com" target="_blank">http://tickets2.brandy.com</a>> <a href="http://ticket.brandy.com" target="_blank">ticket.brandy.com</a> <<a href="http://ticket.brandy.com" target="_blank">http://ticket.brandy.com</a>> <a href="http://ticket2.brandy.com" target="_blank">ticket2.brandy.com</a> <<a href="http://ticket2.brandy.com" target="_blank">http://ticket2.brandy.com</a>><div class="Ih2E3d">
<br>
AddDefaultCharset UTF-8<br>
<br>
PerlModule Apache::DBI<br>
PerlRequire /opt/rt3/bin/webmux.pl<br>
<br>
PerlSetVar MasonStaticSource true<br>
PerlSetVar MasonBufferPreallocateSize 1073741824<br>
PerlSetVar MasonDataCacheDefaults "cache_class=> SharedMemoryCache, cache_de $<br>
PerlSetVar MasonPreloads '/Elements/*'<br>
PerlSetVar MasonCompRoot /opt/rt3<br>
<br>
SetHandler perl-script<br>
PerlHandler RT::Mason<br>
<br>
Alias /titan /opt/rt3/share/html<br>
<br>
# ScriptAlias /titan/ /opt/rt3/share/html<br>
<br>
</VirtualHost><br>
<br>
<VirtualHost *:80><br>
CacheEnable disk /<br></div>
ServerAdmin <a href="mailto:support@brandx.com" target="_blank">support@brandx.com</a> <mailto:<a href="mailto:support@brandx.com" target="_blank">support@brandx.com</a>><div class="Ih2E3d"><br>
DocumentRoot /opt/rt3/share/html<br></div>
ServerName <a href="http://tickets.brandx.com" target="_blank">tickets.brandx.com</a> <<a href="http://tickets.brandx.com" target="_blank">http://tickets.brandx.com</a>><br>
ServerAlias <a href="http://tickets.brandx.com" target="_blank">tickets.brandx.com</a> <<a href="http://tickets.brandx.com" target="_blank">http://tickets.brandx.com</a>> <a href="http://tickets2.brandx.com" target="_blank">tickets2.brandx.com</a> <<a href="http://tickets2.brandx.com" target="_blank">http://tickets2.brandx.com</a>> <a href="http://ticket.brandx.com" target="_blank">ticket.brandx.com</a> <<a href="http://ticket.brandx.com" target="_blank">http://ticket.brandx.com</a>> <a href="http://ticket2.brandx.com" target="_blank">ticket2.brandx.com</a> <<a href="http://ticket2.brandx.com" target="_blank">http://ticket2.brandx.com</a>><div class="Ih2E3d">
<br>
AddDefaultCharset UTF-8<br>
<br>
PerlModule Apache::DBI<br>
PerlRequire /opt/rt3/bin/webmux.pl<br>
<br>
PerlSetVar MasonStaticSource true<br>
PerlSetVar MasonBufferPreallocateSize 1073741824<br>
PerlSetVar MasonDataCacheDefaults "cache_class=> SharedMemoryCache, cache_de $<br>
PerlSetVar MasonPreloads '/Elements/*'<br>
PerlSetVar MasonCompRoot /opt/rt3<br>
<br>
SetHandler perl-script<br>
PerlHandler RT::Mason<br>
<br>
Alias /refense /opt/rt3/share/html<br>
<br>
# ScriptAlias /refense/ /opt/rt3/share/html<br>
<br>
ErrorLog logs/error_log-tickets<br>
<br>
</VirtualHost><br>
<br>
Sincerely,<br>
Doug Eubanks<br>
</div><div class="Ih2E3d"><a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a> <mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a>><br>
<br>
<br></div><div class="Ih2E3d">
On Tue, Feb 24, 2009 at 5:45 AM, Raed El-Hames <<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a> <mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a>>> wrote:<br>
<br>
Hi Doug;<br>
<br>
Make sure you have<br>
ServerName <a href="http://my_brandx_instance.com" target="_blank">my_brandx_instance.com</a><br></div>
<<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>> <<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>><div class="Ih2E3d"><br>
in your virtual host conf file;<br>
<br></div>
<VirtualHost <a href="http://my_brandx.com:443" target="_blank">my_brandx.com:443</a> <<a href="http://my_brandx.com:443" target="_blank">http://my_brandx.com:443</a>>><br>
ServerName <a href="http://my_brandx.com" target="_blank">my_brandx.com</a> <<a href="http://my_brandx.com" target="_blank">http://my_brandx.com</a>><div class="Ih2E3d"><br>
DocumentRoot /opt/rt3/share/html<br>
etc etc<br>
<br>
...<br>
</VirtualHost><br>
<br>
And remember to restart httpd ..<br>
<br>
Good luck;<br>
Roy<br>
<br>
Doug Eubanks wrote:<br>
<br>
I believe I see where you are going with this....<br>
<br>
My problem is that $ENV{'SERVER}, $ENV{'SERVER_NAME}, etc are<br>
not being set to anything. When I had it print all the ENV<br>
variables to a temp file, it only printed 4 or 5 variables and<br>
they were stuff like "MOD_PERL" version, etc.<br>
<br>
For some reason, those environment variables are not set....<br>
<br>
Sincerely,<br>
Doug Eubanks<br>
<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a> <mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a>><br></div><div class="Ih2E3d">
<mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a> <mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a>>><br>
<br>
<br>
<br></div><div class="Ih2E3d">
On Mon, Feb 23, 2009 at 12:35 PM, Raed El-Hames<br>
<<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a> <mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a>><br></div><div><div></div><div class="Wj3C7c">
<mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a> <mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a>>>> wrote:<br>
<br>
Doug;<br>
<br>
Are you using fast cgi , or mod_perl ??, with fastcgi you<br>
can run<br>
as many instances you want --sorry I don't use so I do n't<br>
have<br>
working apache config,<br>
with mod_perl you suppose to only run one instance due to<br>
how the<br>
mod_perl/mason work, however I did find a work around and<br>
this is<br>
how I got my instances working:<br>
<br>
for each instance (brand), I have<br>
RT_SiteConfig_brandx.pm (all in /opt/rt3/local/etc/ )<br>
webmux-brandx.pl (which is a copy of webmux.pl adding the line<br>
$ENV{'SERVER'} = '<a href="http://my_brandx_instance.com" target="_blank">my_brandx_instance.com</a><br>
<<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>><br>
<<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>>'; #at the top where the<br>
rest of<br>
<br>
$ENV is being defined<br>
<br>
Modify local/lib/RT.pm adding :<br>
<br>
if ($ENV{'SERVER'} eq '<a href="http://my_brandx_instance.com" target="_blank">my_brandx_instance.com</a><br>
<<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>><br>
<<a href="http://my_brandx_instance.com" target="_blank">http://my_brandx_instance.com</a>>' ) {<br>
<br>
$SITE_CONFIG_FILE =<br>
'/opt/rt3/local/etc/RT_SiteConfig_brandx.pm' ;<br>
}elsif ($ENV{'SERVER'} eq '<a href="http://my_brandy_instance.com" target="_blank">my_brandy_instance.com</a><br>
<<a href="http://my_brandy_instance.com" target="_blank">http://my_brandy_instance.com</a>><br>
<<a href="http://my_brandy_instance.com" target="_blank">http://my_brandy_instance.com</a>>' ) {<br>
<br>
$SITE_CONFIG_FILE =<br>
'/opt/rt3/local/etc/RT_SiteConfig_brandy.pm' ;<br>
}<br>
<br>
You add these lines @ the top/start of sub LoadConfig<br>
<br>
In you httpd.conf you call the correct webmux for your<br>
instance:<br>
PerlRequire /opt/rt3/bin/webmux-brandx.pl<br>
<br>
Thats it, the above setup allow you to share the same RT<br>
directory<br>
, so customisation is easier,<br>
<br>
Hope that helps,<br>
<br>
Regards;<br>
Roy<br>
<br>
<br>
Doug Eubanks wrote:<br>
<br>
I'm trying to setup a second instance of RT that has a<br>
different branding, but uses the same SQL server, etc.<br>
<br>
I copied my existing (and working) RT installation over<br>
to a<br>
new directory. Then I created the new instance in<br>
Apache in<br>
the httpd.conf, changing the file locations to the new<br>
directories. Then I edited the RT_SiteConfig.pm file to<br>
reflect the new file locations.<br>
<br>
For some reason, the errors are showing up in the original<br>
directory's logs and the error returned is:<br>
[Mon Feb 23 15:47:56 2009] [warning]: [Mason] Cannot<br>
resolve<br>
file to component:<br>
/opt/rt3-[NEWBRAND]/share/html/index.html<br>
(is file outside component root?) at<br>
/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/ApacheHandler.pm<br>
line 853.<br>
(/usr/lib/perl5/vendor_perl/5.8.8/HTML/Mason/ApacheHandler.pm:853)<br>
<br>
The browser returns a 404 error.<br>
<br>
What am I missing? Is it not possible to run two RT<br>
instances<br>
on the same server?<br>
<br>
Sincerely,<br>
Doug Eubanks<br>
<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a> <mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a>><br>
<mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a> <mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a>>><br>
<mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a> <mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a>><br>
<mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a> <mailto:<a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a>>>><br>
<br>
<br>
<br>
<br>
<br>
<<a href="http://www.vialtus.com/disclaimer.html" target="_blank">http://www.vialtus.com/disclaimer.html</a>><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
*Roy El-hames *<br>
<br>
ISP Systems<br>
<br>
<br>
<br>
*Vialtus Solutions*<br>
<br>
*(formerly Pipex Business)*<br>
<br>
<br>
<br>
Direct Dial: +44(0) 208 587 6181<br>
<br>
E-mail: <a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a> <mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a>><br></div></div>
<mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a> <mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a>>><br>
<br>
<br>
<br>
Visit us on:<br>
<br>
<a href="http://www.vialtus.com" target="_blank">www.vialtus.com</a> <<a href="http://www.vialtus.com" target="_blank">http://www.vialtus.com</a>> <<a href="http://www.vialtus.com/" target="_blank">http://www.vialtus.com/</a>><div class="Ih2E3d">
<br>
<br>
<br>
<br>
This email is subject to:<br>
<br>
<br>
<a href="http://www.vialtus.com/disclaimer.html" target="_blank">http://www.vialtus.com/disclaimer.html</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
</div></blockquote><div><div></div><div class="Wj3C7c">
<br>
<br>
-- <br>
<br>
*Roy El-hames *<br>
<br>
ISP Systems<br>
<br>
<br>
<br>
*Vialtus Solutions*<br>
<br>
*(formerly Pipex Business)*<br>
<br>
<br>
<br>
Direct Dial: +44(0) 208 587 6181<br>
<br>
E-mail: <a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a> <mailto:<a href="mailto:rfh@vialtus.com" target="_blank">rfh@vialtus.com</a>><br>
<br>
<br>
<br>
Visit us on:<br>
<br>
<a href="http://www.vialtus.com" target="_blank">www.vialtus.com</a> <<a href="http://www.vialtus.com/" target="_blank">http://www.vialtus.com/</a>><br>
<br>
<br>
<br>
This email is subject to:<br>
<br>
<a href="http://www.vialtus.com/disclaimer.html" target="_blank">http://www.vialtus.com/disclaimer.html</a><br>
<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br>