• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

virtual host in tomcat

 
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all

for demo purpose i need to set up 2 virtual hosts in tomcat

now i tried like million times to fallow simple tutorials about setting up virtual host but with no success

for example i like to set virtual host that will point to tomcat : webapps\tomcat-docs\appdev\sample\web

now this is what i did :


but when i try to serf in IE with www.my.com

its not going noware .... what todo? or what im doing wrong here ?
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you own the domain my.com? If so, have you set up DNS servers appropriately?
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no i dont , its closed network , not connected to the internet

i tried to do this :
http://forums.rimuhosting.com/forums/showthread.php?t=10

but it still dont work
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the error im geting :
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I set up virtual hosts in Tomcat 5.5.9 I use a Host entry that looks like:


Note that the appBase is an absolute directory address and there is no Context entry.

Bill
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it still does not work , do i need configure something else ?

maybe on the pc im working on?

help me im getting crazy ...
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Did you verify that this directory exists?
Does it have a WEB-INF directory inside it?

If not, Tomcat will not recognize it as a valid web structure.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly does your <Host> entry look like now?
What exactly is the error that is reported?

Bill
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all and thanks for your help
it seams that defining virtual hosts based on one ip is working after i define it in the windows hosts file
BUT now i have new problem .
now i need to define 2 hosts based on 2 ips that is i defined 2 ip on my local pc then i configure in the server.xml
something like this :


and its working fine when i serf by this ip but how do i configure dns name to that ip?
thanks
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect you can figure that out from this Tomcat documentation. (warning, I have not actually done this)

Bill
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry but i do not find it there ..
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isnt there something in those docs about defining multiple aliases for a host?

I found that the Host tag uses the exact name only it won't recognize a host name if what it has is the IP numbers.

Bill
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok so i didn't understand it right i guess ..
the alias used to map the name to the host ip ?
is it right ?
 
ben josh
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all
i have another question can i run on the same pc 2 instances of tomcat ? on port 80
but with different ip's?
 
There is no beard big enough to make me comfortable enough with my masculinity to wear pink. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic