0
votes

I am trying to bind an alias to run my app instead of the ip address on the server. So I want to access my app on helloworld.businessname.com:8555/helloworld instead of 172.19.20.xxx:8555/helloworld I added a jboss-web.xml in my project under WEB-INF

<jboss-web>
  <virtual-host>helloworld.businessname.com</virtual-host>
</jboss-web>

and i edited the virtual host tag in my standalone.xml

<subsystem xmlns="urn:jboss:domain:web:1.1" native="false" default-virtual-server="default-host">     
     <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
        <connector name="https" protocol="HTTP/1.1" scheme="https" socket-  binding="https" enable-lookups="false" secure="true">
        </connector>
        <virtual-server name="default-host" enable-welcome-root="true">
            <alias name="localhost"/>
            <alias name="example.com"/>
        </virtual-server>
    <virtual-server name="helloworld.businessname.com" default-web-module="helloworld">
            <alias name="helloworld.businessname.com"/>
        </virtual-server>

When I go to helloworld.businessname.com:8555/ it says not found.

I appreciate it.

1

1 Answers

0
votes

standalone.xml is ok

set jboss-web.xml as:

 <jboss-web>    
    <context-root>/</context-root> 
    <virtual-host>helloworld.businessname.com</virtual-host>
 </jboss-web>

set hosts file (c:\windows\system32\drivers\etc\hosts or /etc/hosts) on server as:

 127.0.0.1 helloworld.businessname.com

run your server as:

standalone.bat -b 0.0.0.0

and deploy.