Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83BABB051 for ; Sat, 14 Jan 2012 03:53:46 +0000 (UTC) Received: (qmail 83792 invoked by uid 500); 14 Jan 2012 03:53:41 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 83417 invoked by uid 500); 14 Jan 2012 03:53:28 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 83405 invoked by uid 99); 14 Jan 2012 03:53:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jan 2012 03:53:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of eric.maillist@gmail.com designates 209.85.215.45 as permitted sender) Received: from [209.85.215.45] (HELO mail-lpp01m010-f45.google.com) (209.85.215.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jan 2012 03:53:15 +0000 Received: by lags15 with SMTP id s15so906547lag.18 for ; Fri, 13 Jan 2012 19:52:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=F4SmUBcifHBozl4u09lUTDrja3TLeZ4X5/hm6rmV1Rw=; b=o7t+ytbR89CAajETBSHNqUxOpUvGvksMhD67t42dqSP1bxX5jEiTyvP5oJ2DONIILt YpHveKTOK2w5lDkw0YSe3dssgIYgFQqiN90FEANaAJR2dhabYGgCmXwFXS196nQ5dOMv oQkvJOqlGihrWqa6I/2WrkR2O/V6SC+x09wFM= MIME-Version: 1.0 Received: by 10.112.87.162 with SMTP id az2mr842592lbb.82.1326513174567; Fri, 13 Jan 2012 19:52:54 -0800 (PST) Received: by 10.112.87.34 with HTTP; Fri, 13 Jan 2012 19:52:54 -0800 (PST) In-Reply-To: <4F10F3DD.9020607@gmail.com> References: <4F10F3DD.9020607@gmail.com> Date: Fri, 13 Jan 2012 21:52:54 -0600 Message-ID: Subject: Re: static content not served for non-root apps via mod_jk From: Eric P To: Tomcat Users List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I remember now why static content works for my ROOT app. I have Apache aliases set-up pointing to specific system directories for all static content. For example, I have all images for the ROOT app aliased here. Alias /img /opt/tomcat7/webapps/ROOT/img Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all But is there a better approach for this so that I don't have to create static content aliases for each new Tomcat app I deploy? I would be stuck using a unique alias for every app which seems crazy. Thanks, Eric 2012/1/13 Eric P : > Hi all, > > I'm having trouble getting Apache to serve static content (jpg, css, js, = etc.) for Tomcat apps via mod_jk for any > application except the ROOT Tomcat app. =C2=A0The ROOT app shows static c= ontent just fine. > > I have the following Apache settings attempting to point *all* requests t= o Tomcat and unsetting certain static content > extensions so that Apache will serve them. > > ...clip... > # Send everything to Tomcat > JkMount /* ajp13 > > # And then unsend static content so that httpd will serve it > JkUnMount /*.js ajp13 > JkUnMount /*.css ajp13 > JkUnMount /*.jpg ajp13 > JkUnMount /*.png ajp13 > JkUnMount /*.gif ajp13 > ...clip... > > These settings work for the ROOT Tomcat app but not for anything else inc= luding Tomcat's manager app. > > FYI. when I access via Tomcat's port/web server everything works. > E.g., http://localhost:8080/manager/html > > But not when I access via port 80. > E.g., http://localhost/manager/html > > I"m seeing a 404 Not Found for all static content via port 80/Apache (aga= in, the only exception is any static content > belonging to the ROOT Tomcat app). =C2=A0I'm experiencing the exact same = behavior on both an Ubuntu and CentOS. > > Thanks for any ideas. > Eric --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org