Hi

How can i create virtual host in JBoss server 4.0.4.in that,how can i mapped to my domain name. i.e www.myproject.com like this.
and how to run in the server.

You can do virtual hosting, using this:

<?xml version="1.0"?>
<!DOCTYPE jboss-web>
 
<jboss-web>
<context-root>myapp</context-root>
<virtual-host>apphost1</virtual-host>
</jboss-web>

And then define hosts in your
deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml

Simply copy the <host name="localhost"></host> tags and contents, and rename
"localhost". You can then add unlimitted alias tags. Here's an example:

<Host name="osnet">
<Alias>66.74.22.21</Alias>
<Alias>mydomain.com</Alias>
<Alias>subdomain.mydomain.com</Alias>
<Alias>mylocalhost1</Alias>
<Alias>mylocalhost2</Alias>
 
<!-- Access logger -->
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="osnet_access" suffix=".log"
pattern="common"
directory="${jboss.server.home.dir}/log"/>
 
<Valve
className="org.jboss.web.tomcat.security.SecurityAssociationValve"/>
<!-- Default context parameters -->
<DefaultContext cookies="true" crossContext="true"
override="true"/>
</Host>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.