This looks correct. Tomcat knows of no wildcard for domains so you
have to do it in Apache.

Make sure to clear all caching, restart both servers and try it again.

Kind Regards,
Nitai

On Sun, Feb 7, 2010 at 12:39 AM, Mats Stromberg <[email protected]> wrote:
> Hi,
> When I use the www.mydomain.com my page shows up but changing it to
> 12345.mydomain.com I get the Tomcat Administration page...
> My Virtual Host  is now
> <VirtualHost 94.199.241.124:80>
>         DocumentRoot /var/www/mydomain.com
>         ServerName mydomain.com
>         ServerAlias *.mydomain.com
>         ProxyPreserveHost On
>         ProxyPass / ajp://localhost:8009/
>         ProxyPassReverse / ajp://localhost:8009/
>         RewriteEngine On
>         RewriteRule ^/(.*\.cf[cm]/?.*)$ ajp://localhost:8010/$1 [P]
>         ErrorLog logs/mydomain_error.log
>         CustomLog logs/mydomain_access.log combined
> </VirtualHost>
> and in the server.xml I have
>       <Host name="mydomain.com" appBase="webapps">
>             <Alias>www.mydomain.com</Alias>
>             <Context path="" docBase="/var/www/mydomain.com"
> allowLinking="true" />
>       </Host>
> AJP seems to work atleast for the www but not for 1234x.mydomain.com
> I must be doing something really stupid here that I can't seen...
> /Mats/
> On Sat, Feb 6, 2010 at 12:26 AM, Nitai @ Razuna <[email protected]> wrote:
>>
>> Hi,
>>
>> Sorry I was on the "run" the whole day and only got to some eMails now...
>>
>> Right, I'm just including what I have in my server.xml file here, ok?.
>> So here we go:
>>
>> <Host name="localhost"  appBase="webapps" unpackWARs="true"
>> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
>> </Host>
>>
>> <!-- HOST: Razuna -->
>> <Host name="razuna.org" appBase="webapps">
>> <Alias>www.razuna.org</Alias>
>> <Context path="" docBase="ABSOLUTEPATHHERE" allowLinking="true" />
>>  </Host>
>>
>> <Host name="razuna.com" appBase="webapps" unpackWARs="true"
>> autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false">
>> <Context path="" docBase="ABSOLUTEPATHHERE" allowLinking="true" />
>> </Host>
>>
>> In Apache I then have a virtual host like (you need to create virtual
>> hosts for each host that you have in tomcat):
>>
>> <VirtualHost *:80>
>> ServerName razuna.com
>> DocumentRoot ABSOLUTEPATHHERE
>>
>> ProxyPreserveHost On
>> ProxyPass / ajp://localhost:8010/
>> ProxyPassReverse / ajp://localhost:8010/
>>
>> RewriteEngine On
>> RewriteRule ^/(.*\.cf[cm]/?.*)$ ajp://localhost:8010/$1 [P]
>> </VirtualHost>
>>
>> Note: You use the SAME DocumentRoot in Apache as the docBase in
>> Tomcat. With the RewriteRule you tell Apache to get CFM files from
>> Tomcat and the rest will be served by Apache directly (static files,
>> JS, CSS, images, etc).
>>
>> This should get you going. If not, check that you have the
>> mod_proxy_ajp enabled in Apache. Let me know how it works.
>>
>> Kind Regards,
>> Nitai
>>
>>
> --
> 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