0
votes

Recently, I migrated from Jboss EAP 6.4 to Jboss EAP 7.1. I have a Jboss EWS in front of Jboss EAP, with mod cluster to connect to them. I use some static content which is kept in websever (Jboss EWS). While accessing the webserver URL it used to server the static content in websever.

However, after migrating to JBoss EAP 7.1, it is looking for static content in Appserver and giving 404. This possibly is due to new addition of undertow, which wasn't in place in Jboss EAP 6.x What changes should I do ( possibly in undertow config) so that it looks for static content in webserver itself, instead of appservers.

1

1 Answers

0
votes

You need to add file handler and another location to the undertow subsystem in standalone.xml to serve static content (like images):

<server name="default-server">
    <http-listener name="default" socket-binding="http"/>
    <host name="default-host" alias="localhost">
        <location name="/" handler="welcome-content"/>
        <location name="/img" handler="images"/>
    </host>
</server>
<handlers>
    <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
    <file name="images" path="/var/images" directory-listing="true"/>
</handlers>