Ok here is what I'm wanting to do. I have my production site running on my domain.
I want to have a testing site thats a sub domain for development.
now I have all my DNS records set and everything is resolving.
So in my tomcat directory on top of the webapps dir i created a dev dir at the same level.
both dirs have ROOT directory.
here is an example of how my server.xml file is set up.
My question is why does both www.example and dev.example resolve and load the production page?
How do i get the other subdomain to refer to the /dev and not the /webapp directory ?
I 'm feeling kinda lost here so any point in the right direction would be great.
"Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do." -- Steve Jobs
DNS resolves (sub)domain names to ONLY the IP address. There is no provision whatsoever in DNS to resolve context names or even tcp/ip port numbers (like 8080). So the incoming URL must provide those little niceties the hard way.
What we do in the real world in cases like that is to point the incoming URLs to a proxy that has URL rewriting capabilities so that something like "http://dev.example.com" gets rewritten and routed to Tomcat as "http://dev.example.com:8080/devapp".
Customer surveys are for companies who didn't pay proper attention to begin with.
I see what you mean now. However I only want to run the tomcat server and not use apache to proxy and remap all the URLS. I already have all port 80 traffic redirected to 8080 by the iptables. So is there a module or something to write in the configuration files allows if dev.example.com to be rewritten in the url dev.example.com/dev
im not worried about the port because all traffic is redirected to port 8080
Hey Tim thank you so much for all your help. I solved it with a virtual server within server.xml file. When I get back into the office I'll show the exact setup i set for <Host> tags. It works like a charm.
Joseph Swager wrote:Hey Tim thank you so much for all your help. I solved it with a virtual server within server.xml file. When I get back into the office I'll show the exact setup i set for <Host> tags. It works like a charm.
Any chance you can collaborate how to solve this ??? I'm stuck on the same problem...