• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in creation of Virtual host in JBoss.

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one war file named "showcase.war" and deployed locally on my JBoss Server.

Now I want to create virtual host mechanism to access this application via different URLs.

I have done following Things to achieve this.

1. Added one attribute useIPVHost to Connector in server.xml




2. Added one Host entry to the server.xml



3. Created one jboss-web.xml file into the /default/deploy/showcase.war/WEB-INF directory

4. Added following to the jboss-web.xml file




I have done all this configuration as mentioned in the book "Manning - JBoss in Action"

Now when I try to access my application using "http://bhavesh:8080/show" or "http://bhavesh:8080/show" but browser telling that Requested URL could not be retrieved.

I have invested lot of hours to make it work but still struggling to work it out.

Can anybody enlight me where I am missing anything in configuring virtual host?

Thanks.
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Posting the complete error message thrown from the browser.

 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have made and entry to the host file :

"C:\WINDOWS\system32\drivers\etc\hosts" file.


127.0.0.1 localhost
127.0.0.1 bhavesh

But still not able to resolve the issue


 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Resolved the issue:

you have to register a qualified name (like bhavesh.com,bhavesh.org etc) in the file that I have mentioned in previous comment.

so the entry would look like:

127.0.0.1 bhavesh.com
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But still the original problem is not resolved.

What I am doing is just making an alias to local host through system file.

now when I try to access my application using http://www.bhavesh.com:8080/show/ , It is not working.

How would I make it work?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm a bit late to the party, but if you having the same problem as the above try :

1. KISS (Keep It Simple and Stupid)
server.xml :
<Host name="host-localhost">
<Alias>localhost</Alias>
</Host>

jboss-web.xml :
<Virtual-host>host-localhost</Virtual-host>

C:\WINDOWS\system32\drivers\etc\hosts :
127.0.0.1 localhost

2. If you what to do your own one to make your programming not boring and to get the feel of what it will look like live :
server.xml :
<Host name="host-bhavesh">
<Alias>bhavesh</Alias>
</Host>

jboss-web.xml :
<Virtual-host>host-bhavesh</Virtual-host>

C:\WINDOWS\system32\drivers\etc\hosts :
127.0.0.1 localhost
127.0.0.1 bhavesh

i haven't checked but i don't think .com at the end would work as to my current understanding if it was added then
bhavesh would be checked on the domain registry of .com and not on your local server.. how ever i could be wrong.

the naming is important, we all make the mistake, so double check

hope this helps
 
Hey! You're stepping on my hand! Help me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic