This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Problem in creation of Virtual host in JBoss.  RSS feed

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!