Skip to content
Peter Stadler edited this page Jul 14, 2014 · 5 revisions

Configuring eXist

Following files need to be modified:

${EXIST_HOME}/conf.xml

indexer: preserve-whitespace-mixed-content must be set to "yes":

<indexer preserve-whitespace-mixed-content="yes"/>

${EXIST_HOME}/tools/jetty/etc/jetty.xml (line 134)

Set the http(s) port. For security reasons (on a production system), you can restrict the Jetty server to listen to localhost only (if proxied behind apache, e.g.)

${EXIST_HOME}/webapp/WEB-INF/controller-config.xml

Deactivate everything you don't need.

${EXIST_HOME}/webapp/WEB-INF/web.xml

Again, deactivate everything you don't need. I especially recommend commenting out all betterform, SOAP and cocoon related stuff.

log4j.xml

The location of the file depends: when running eXist as a service via the wrapper, the file ${EXIST_HOME}/tools/wrapper/conf/log4j.xml should be modified. Otherwise, it's ${EXIST_HOME}/log4j.xml.

Add an appropriate logger for the WeGA-WebApp (and adapt the location of the log file):

<appender name="wega.core" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="${exist.home}/webapp/WEB-INF/logs/wega.log"/>
    <param name="MaxFileSize" value="500KB"/>
    <param name="Encoding" value="UTF-8"/>
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
    </layout>
</appender>

<category name="wega.webapp" additivity="false">
    <priority value="info"/>
    <appender-ref ref="wega.core"/>
</category>

If you are starting eXist via the wrapper, you might want to change all file paths from ${exist.home}/webapp/WEB-INF/logs to ${exist.home}/tools/wrapper/logs so all your logs will be in one place.

Configuring Digilib