Application with JBOSS Wildfly reply via DNS

Asked

Viewed 302 times

0

I am extremely beginner in this part of setting environment and need to put an application I developed in production. I already have a registered domain and I would like the user, instead of typing IP:8080/nameApp, to enter the domain of the application. It turns out that I have no idea how to do this in Jboss, I have done it before in IIS and the configuration is usually very simple. I ran the internet after that, but to no avail. Does anyone have any idea where I set this up?

I am using Jboss Wildfly 10, the application is in Java with Spring and I am climbing the server in standalone mode.

Any help is welcome. Thank you.

2 answers

2


You need the configuration of jboss in the briefcase WEB-INF of your project. For Wildfly to recognize the path (other than the default), add the following tag <context-root> followed by the prefix you want to be in front of your application, as you want it to be executed on root just add to /

WEB-INF/jboss-web.xml

<?xml version="1.0"?>
<jboss-web>
   <context-root>/</context-root>

  <!-- outras configs do projeto -->
</jboss-web>
  • Thank you very much!

0

In addition to what Paulo H. Hartmann suggested, I also changed my standalone.xml to the following one::

<host name="default-host" alias="localhost, myAppDomain.com" default-web-module="myApp.war">
    <location name="/" handler="welcome-content"/>
    <filter-ref name="server-header"/>
    <filter-ref name="x-powered-by-header"/>
</host>

With this setting, I can access my application also through DNS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.