How to disable welcome-root / welcome content in wildfly

1. Open your standalone.xml file and head to the undertow subsystem near the bottom of the file.

2. Delete the host mapper that maps requests to «/» to the «welcome-content» handler:

  1. <server name=»default-server»>
  2. <host name=»default-host» alias=»localhost»>
  3. <location name=»/» handler=»welcome-content»/> <!— Delete this line! —>
  4. </host>
  5. </server>

3. Delete the welcome-content handler itself since you’re not planning on using it. Since this is the only handler, you can delete the whole <handlers> element:

  1. <handlers>
  2. <file name=»welcome-content» path=»${jboss.home.dir}/welcome-content»/>
  3. </handlers>