1.I need to direct from port 80 to 8080
Maybe you can add a iptables rule to redirect, like this:
# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
2.In my URL I need to hide root context name
I need to redirect URL, if I enter www.hello.com to my application.
OK, you must do 2 things, configure the application context root and configure a virtual host, configure the jboss vhost then add you domain in your DNS server, or locally for tests.
First: Configure the application context root and configure a virtual host
Your jboss-web.xml must be like that:<?xml version="1.0" encoding="UTF-8" ?>
In your standalone|domain.xml, in the urn:jboss:domain:undertow:1.0 subsystem, between server tags, add this conf:
<host name="V_HOST_NAME" alias="www.hello.com" default-web-module="APP_NAME"/>
Typically the default-web-name is the war name whithout suffix, or you are using maven you mus use <artifactId> name.
Third: Configure your DNS.
Thanks a ton . It helped me.
If you are just tinkering with your personal system at home or work, the above approach might work. I probably will be suggesting something that you didn't ask for but I will continue ...
- Once installed you can add a VirtualHost entry into the httpd.conf file, just as shown in the post here.
- As a final tweak you have to ensure that www.example.com is pointed to the machine where the app is installed/running, so you have to modify the DNS entries to do the required mapping.
Also, "Accept" the replies providing your desired solution. This will give points to the people contributing to solutions in the community.
Thank you for the reply .I would try out this solution too.Will post the update.