wildfly 配置静态文件服务器

Add another file handler and another location to the undertow subsystem in standalone.xml:

 

<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" follow-symlink="true"/>
</handlers>

 

http://stackoverflow.com/questions/22684037/how-to-configure-wildfly-to-serve-static-content-like-images?rq=1

爱编程-编程爱好者经验分享平台

文章评论

  

版权所有 爱编程 © Copyright 2012. w2bc.com. All Rights Reserved.
闽ICP备12017094号-3