aspose file tools*
The moose likes JBoss/WildFly and the fly likes Virtual host configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Virtual host configuration" Watch "Virtual host configuration" New topic
Author

Virtual host configuration

Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
Hi All,
I am new to Jboss.I am using Jboss 4.0.4.When I start up the server the application can be accessible from http://132.186.200.200:8080/SelfCare/.but I want to have the url as something like http://www.SelfCare.com.Can it be possible?if possible please help me out.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

See this http://www.jboss.org/community/docs/DOC-12549


[My Blog] [JavaRanch Journal]
Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
Thanks for the comment.
I go through the content and make the jboss-web.xml file like this:

and the server.xml file like this


now what is the url i had to access.it did not start up defaultly.Please let me know
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

Try http://suddhasattwa:8080/RMTWeb
Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
I have tried that url but it did not work at all...I tried different other usrl like http://suddhasattwa/,http://suddhasattwa/RMTWeb,http://suddhasattwa:8080/ etc.Anyhthing is not working. Is there something more to do as configuartion?Is the xml file is not properly written?Also I want the url as www.suddhasattwa.com.Please reply.
Javid Jamae
Author
Ranch Hand

Joined: May 14, 2008
Posts: 198
Do you own www.suddhasattwa.com? Set your host to:



Point your jboss-web.xml to:



And make sure you have DNS set up correctly to point that domain name to your machine?

Also, try configuring the AccessLogValve on the Engine (I'm pretty sure you can do this) to see if the request is being sent to the defaultHost that is configured in the Engine (localhost).


Author: JBoss in Action, javidjamae.com, @javidjamae on Twitter
Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
No I don't own a domain.I just want to configure an application in LAN.But want that other person don't need to type the IP address.I want to type a predefined url.For that reason I want the virtual host.Also I have written earlier that I am new to JBoss, so I dont know how to configure AccessLogValve.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

Some time back i had tried this. That post talks about JBoss-5, but i guess should be similar for JBoss-4.x
Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
Thanks for the link.I went through the doc.Can you please tell me where to find hosts file?Also can it not be possible to have the url without the Ip address?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

Suddhasattwa Mukherjee wrote:Can you please tell me where to find hosts file?


On *nix Operating system its under /etc/hosts. For Windows its unders system32/drivers/etc/hosts (if i remember correctly). A system search will show up the file.

Also can it not be possible to have the url without the Ip address?


Sorry, i did not understand this question. Which IP address are we talking about?
Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
I found the host file at the location C:\system32\driver\etc\.For the second question I was wrong.I want to have url where no port will be visible.
Javid Jamae
Author
Ranch Hand

Joined: May 14, 2008
Posts: 198
There is always a port, but the browser just hides it from the user if its the standard HTTP port (80). You can either configure the Tomcat/JBossWeb connector in server.xml to use port 80, or you can use a load balancer that is configured to use port 80. The load-balancer can be hardware or software (such as Apache/IIS using mod_jk or mod_proxy to point to JBoss).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Virtual host configuration