Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 75296 invoked from network); 22 Oct 2010 10:23:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Oct 2010 10:23:27 -0000 Received: (qmail 1730 invoked by uid 500); 22 Oct 2010 10:23:24 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 1406 invoked by uid 500); 22 Oct 2010 10:23:20 -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 1393 invoked by uid 99); 22 Oct 2010 10:23:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Oct 2010 10:23:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Oct 2010 10:23:13 +0000 Received: from [192.168.245.129] (p549E87A5.dip0.t-ipconnect.de [84.158.135.165]) by tor.combios.es (Postfix) with ESMTPA id 55FE2226135 for ; Fri, 22 Oct 2010 12:19:09 +0200 (CEST) Message-ID: <4CC165F7.2050607@ice-sa.com> Date: Fri, 22 Oct 2010 12:22:47 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Urgent: how to run htaccess on tomcat References: <4CC16108.4070405@ice-sa.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit abhishek jain wrote: > On Fri, Oct 22, 2010 at 3:31 PM, Andr� Warnier wrote: > >> abhishek jain wrote: >> >>> On Fri, Oct 22, 2010 at 3:05 PM, abhishek jain >>> wrote: >>> >>> Hi friends, >>>> I am in middle of urgent production issue. >>>> Can some one help me how to allow .htaccess on tomcat >>>> i have a virtualhost on apache with tomcat installed. >>>> >>>> Apache 2.x >>>> >>>> tomcat 5.5.x >>>> struts 1.2 >>>> Pl. help asap. >>>> >>>> Thanks >>>> -- >>>> Thanks and kind Regards, >>>> Abhishek jain >>>> >>>> >>>> to clarify. >>> I want to run PHP and jsp pages, and I need index.php as the default page. >>> Also, I need to use .htaccess and not tomcats urlrewritefilter or so. >>> >>> >> Unfortunately, this does not really clarify things. >> >> Some things, which may be relevant or not, depending on your configuration >> : >> - Tomcat does not care at all about .htaccess; that is purely "an Apache >> httpd thing". >> (In other words, you cannot make Tomcat be "aware" of .htaccess) >> - Usually, it is a bad idea to share the same application directories >> between Apache httpd and Tomcat >> - Usually also, when Apache httpd and Tomcat work together, this is done >> via a "connector", and it may be possible at that level to do something >> about .htaccess. >> >> But you are not telling us anything about your configuration, OS, setup >> etc.. so it is difficult to help. >> Main thing here : how are Apache httpd and Tomcat connected to eachother ? >> >> > Hi > Sorry for not clarifying at first place, > > I have a cpanel setup with the following configuration in cp_jkmount.conf > for that virtualhost > > > JkMount /*.jsp ajp13 > JkMount /servlet/* ajp13 > JkMount /servlets/* ajp13 > JkMount /* ajp13 > JkUnMount /cart/* ajp13 > JkUnMount /blog/* ajp13 > JkUnMount /images/* ajp13 > JkUnMount /images-ns/* ajp13 > JkUnMount /*.php ajp13 > JkUnMount /*.html ajp13 > JkUnMount /*.htm ajp13 > JkUnMount /*.htaccess ajp13 > > > yes there must be a connector and I am not sure what it is , how do i know > of that. > I have Centos 5.x as the OS. > The above tends to indicate that the connector is mod_jk. (The question being if this configuration is really enabled, since it is conditional). But let's imagine that it is. First, one remark : these lines : > JkMount /*.jsp ajp13 > JkMount /servlet/* ajp13 > JkMount /servlets/* ajp13 are useless, because the next line > JkMount /* ajp13 overrides them all. So basically you are passing everything to Tomcat, except the URLs which match any of your JkUnMount lines. Second critic : From a security point of view, it would be better to do the opposite : /only/ forward to Tomcat the specific URLs that need to be processed by Tomcat. Like this maybe : JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 JkMount /servlets/* ajp13 Now, you still need to explain what you are trying to achieve. Where in this, and for what reason, does .htaccess need to be involved ? What is the content of the .htaccess file ? (remove any private info) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org