wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat Virtual Hosting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Virtual Hosting" Watch "Tomcat Virtual Hosting" New topic
Author

Tomcat Virtual Hosting

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
I have a dedicated server. The OS=RHE, DB=Oracle XE, javac 1.6.0_02, tomcat-5.5.23

I want to do virtual hosting for tomcat

Thanks & best regards
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

For virtual hosting with tomcat you can see the official apache tomcat documentation for virtual hosting.

Also, maybe this link is also helpful.
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Thanks a lot!

I am studying if any problem then I'll again request help

Thanks again & best regards
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Originally posted by Anubhav Anand:
For virtual hosting with tomcat you can see the official apache tomcat documentation for virtual hosting.

Also, maybe this link is also helpful.


I implemented the directives of the link http://www.ex-parrot.com/~pete/tomcat-vhost.html as you provided and its work well but now the problem is that I am unable to access new created host http://127.0.0.1:7070/$host then its work. I need to access it with http://127.0.0.1:7070/ i.e. without $host like when we accessing root of tomcat

I am really thankful to you. Appreciated!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
As I recall, the Host mechanism depends on an exact match in the host part of the URL. Therefor, using 127.0.0.1 will ALWAYS go to the default host.

Perhaps you can add new alias entrys for 127.0.0.1 in your hosts file in order to test this.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tomcat Virtual Hosting