tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Cheshire <>
Subject mod_alias equivalent for tomcat 8?
Date Fri, 08 Sep 2017 22:00:33 GMT
In tomcat8, how do I go about configuring a Resources element to
replace mod_alias directives in httpd?

Currently my mod_alias config for httpd has

    AliasMatch ^/images/(.*)$ /var/cdn/sandbox1/images/$1
    AliasMatch ^/(.*)/images/(.*)$ /var/cdn/sandbox1-$1/images/$2
    <DirectoryMatch /var/cdn/sandbox1(.*)/images>
        Order allow,deny
        Allow from all

inside a virtualhost.

Now mod_jk config is now just

    JkMount  /* sandbox1

to send everything to tomcat (I was unmounting /images otherwise to
get mod_alias to do its thing).

I have tried all kinds of variations of

    <PreResources base="/var/cdn/sandbox1/images"
                  webAppPath="/images" />

in my context.xml and I get nothing but 404s from tomcat.

What is the difference between FileResourceSet and DirResourceSet? The
documentation explains JarResourceSet and ignores the other two. Even
the javadocs don't say much that would lead to me use over the other.

I tried to configure logging by adding

org.apache.catalina.webresources.level = FINEST

to but nothing appears in catalina.out (yes I
restarted tomcat). I am utterly clueless when it comes to juli, I've
been using log4j and logback since dinosaurs roamed the earth.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message