0 Replies Latest reply on Dec 9, 2014 7:18 AM by Thorben Janssen

    Access log files via web request

    Thorben Janssen Newbie



      I want to access the Wildfly 8.1.0.Final log files via a web request and therefore defined a static web resource in the standalone.xml.

      <subsystem xmlns="urn:jboss:domain:undertow:1.1">
                  <server name="default-server">
                      <host name="default-host" alias="localhost">
                          <location name="/" handler="welcome-content"/>
                          <location name="/log" handler="log"/>
                          <filter-ref name="server-header"/>
                          <filter-ref name="x-powered-by-header"/>
                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
                      <file name="log" path="${jboss.server.log.dir}" directory-listing="true"/>
                      <response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
                      <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>


      Now I can access the log directory in my browser but I cannot open the log file. The server starts a download, if I click on one of the files.

      What do I need to change to open the log files within my browser?