Well, I can't do that since I don't have control over the 1234x This is sortof a users own page controlled by a userid in the DB so for each user I would have to add an Alias /Mas/
On Sun, Feb 7, 2010 at 1:05 AM, Peter J. Farrell <[email protected]> wrote: > Try adding <alias>1234x.mydomain.com</alias> to your Tomcat "host" > configuration block. Tomcat uses the host name to match the incoming ajp > request from Apache to the correct "host" block in Tomcat. If you don't > have 1234x.mydomain.com in your Tomcat host, then you will get the Tomcat > admin page as you stated. > > You could also add this if you want a * like matching: > > <Host name="localhost" ...> > ... > <Valve className="org.apache.catalina.valves.RemoteHostValve" > allow="*.mycompany.com,www.yourcompany.com"/> > <Valve className="org.apache.catalina.valves.RemoteAddrValve" > deny="192.168.1.*"/> > ... > </Host> > > HTH, > .Peter > > Mats Stromberg said the following on 06/02/10 17:39: > > 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 !! > > > -- > 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 !!
