Usually I'm not the one who is left out of ideas, but I am now. For
the reference here is my complete setting again;

Apache:
<VirtualHost *:80>
        ServerName razuna.razuna.com
        ServerAlias *.razuna.com
        DocumentRoot /opt/tomcat/webapps/razuna

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        ProxyRequests Off
        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>

        ProxyPreserveHost On
        ProxyTimeout 120
        ProxyVia On
        ProxyPass / ajp://localhost:8009/ ping=5 timeout=120
        ProxyPassReverse / ajp://localhost:8009/

        RewriteEngine On
        RewriteRule ^/(.*\.cf[cm]/?.*)$ ajp://localhost:8009/$1 [P]
</VirtualHost>

Tomcat:

<Engine name="Catalina" defaultHost="localhost">

      <Host name="localhost"  appBase="webapps" unpackWARs="false"
autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false">
        <Context path="" docBase="/opt/tomcat/webapps/razuna/"
allowLinking="true" />
      </Host>

</Engine>

Kind Regards,
Nitai

On Sun, Feb 7, 2010 at 9:34 PM, Mats Stromberg <[email protected]> wrote:
> I need more hosts in Tomcat so then I keep my tomcat.mycompany.com...  Still
> it didn't work :(
>
> On Sun, Feb 7, 2010 at 9:30 PM, Nitai @ Razuna <[email protected]> wrote:
>>
>> In server.xml for defaulthost enter "tomcat.mycompany.com".
>>
>> If you only have one host in Tomcat you can also use localhost.
>>
>> On Sun, Feb 7, 2010 at 9:26 PM, Mats Stromberg <[email protected]>
>> wrote:
>> > :) I need those 1000% :)
>> > Well, do I use the localhost  or do I go for my "now" static host block
>> > Just created a tomcat.mycompany.com entry in ma server.xml
>> > meaning  I changed the
>> >       <Host name="mycompany.com" appBase="webapps">
>> >             <Alias>www.mycompany.com</Alias>
>> >             <Context path="" docBase="/var/www/mycompany.com"
>> > allowLinking="true" />
>> >       </Host>
>> >  to
>> >       <Host name="tomcat.mycompany.com" appBase="webapps">
>> >             <Alias>www.mycompany.com</Alias>
>> >             <Context path="" docBase="/var/www/mycompany.com"
>> > allowLinking="true" />
>> >       </Host>
>> > and my vhost is now
>> > <VirtualHost *:80>
>> >         DocumentRoot /var/www/mycompany.com
>> >         ServerName mycompany.com
>> >         ServerAlias *.mycompany.com
>> >         ProxyPreserveHost On
>> >         ProxyTimeout 120
>> >         ProxyVia On
>> >         ProxyPass / ajp://tomcat.mycompany.com:8009/ ping=5 timeout=120
>> >         ProxyPassReverse / ajp://tomcat.mycompany.com:8009/
>> >         RewriteEngine On
>> >         RewriteRule ^/(.*\.cf[cm]/?.*)$
>> > ajp://tomcat.mycompany.com:8009/$1
>> > [P]
>> > </VirtualHost>
>> > Had to remove the ping=5 to be able to start tha Apache...
>> > www works fine  123.mycompany gets me again 403 Page :(
>> > Regards,
>> > /Mats/
>> > On Sun, Feb 7, 2010 at 9:11 PM, Nitai @ Razuna <[email protected]> wrote:
>> >>
>> >> The you did not add the ReserveProxyHost (or something like that) in
>> >> Apache. There is a setting in Apache that will send the hostname to
>> >> the proxy. You need to add that, otherwise it will always be the
>> >> Tomcat domain name.
>> >>
>> >> Since I'm a nice guy. I digged out my Apache conf (I use Nginx) and
>> >> here is what has been working for me;
>> >>
>> >> ProxyPreserveHost On
>> >> ProxyTimeout 120
>> >> ProxyVia On
>> >> ProxyPass / ajp://localhost:8009/ ping=5 timeout=120
>> >> ProxyPassReverse / ajp://localhost:8009/
>> >>
>> >> RewriteEngine On
>> >> RewriteRule ^/(.*\.cf[cm]/?.*)$ ajp://localhost:8009/$1 [P]
>> >>
>> >> Put these lines in there and I'm 1000% sure it will work.
>> >>
>> >>
>> >>
>> >> On Sun, Feb 7, 2010 at 9:07 PM, Mats Stromberg <[email protected]>
>> >> wrote:
>> >> > I tried this but I didn't get the result from Apaches call..  just
>> >> > the
>> >> > one
>> >> > from the Tomcat...
>> >> > Ned to scroll back up in the thread to see what I did then...
>> >>
>> >>
>> >>
>> >> --
>> >> See for yourself how easy it is to manage files today. Join the
>> >> revolution!
>> >>
>> >> Razuna SaaS On-Demand - Hosted Digital Asset Management Solution
>> >> http://www.razuna.com/
>> >>
>> >> Razuna - Open Source Digital Asset Management
>> >> http://www.razuna.org/
>> >>
>> >> Follow us on Twitter
>> >> http://twitter.com/razunahq
>> >>
>> >> --
>> >> Open BlueDragon Public Mailing List
>> >>  http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
>> >>  mailing list - http://groups.google.com/group/openbd?hl=en
>> >>
>> >>  !! save a network - please trim replies before posting !!
>> >
>> > --
>> > Open BlueDragon Public Mailing List
>> > http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
>> > mailing list - http://groups.google.com/group/openbd?hl=en
>> >
>> > !! save a network - please trim replies before posting !!
>>
>>
>>
>> --
>> See for yourself how easy it is to manage files today. Join the
>> revolution!
>>
>> Razuna SaaS On-Demand - Hosted Digital Asset Management Solution
>> http://www.razuna.com/
>>
>> Razuna - Open Source Digital Asset Management
>> http://www.razuna.org/
>>
>> Follow us on Twitter
>> http://twitter.com/razunahq
>>
>> --
>> Open BlueDragon Public Mailing List
>>  http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
>>  mailing list - http://groups.google.com/group/openbd?hl=en
>>
>>  !! save a network - please trim replies before posting !!
>
> --
> Open BlueDragon Public Mailing List
> http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
> mailing list - http://groups.google.com/group/openbd?hl=en
>
> !! save a network - please trim replies before posting !!



-- 
See for yourself how easy it is to manage files today. Join the revolution!

Razuna SaaS On-Demand - Hosted Digital Asset Management Solution
http://www.razuna.com/

Razuna - Open Source Digital Asset Management
http://www.razuna.org/

Follow us on Twitter
http://twitter.com/razunahq

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to