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 48C9910252 for ; Wed, 4 Dec 2013 14:22:51 +0000 (UTC) Received: (qmail 75854 invoked by uid 500); 4 Dec 2013 14:21:05 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 75621 invoked by uid 500); 4 Dec 2013 14:20:54 -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 75151 invoked by uid 99); 4 Dec 2013 14:20:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2013 14:20:35 +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 (athena.apache.org: domain of dmikusa@gopivotal.com designates 209.85.128.42 as permitted sender) Received: from [209.85.128.42] (HELO mail-qe0-f42.google.com) (209.85.128.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2013 14:20:30 +0000 Received: by mail-qe0-f42.google.com with SMTP id b4so15516517qen.1 for ; Wed, 04 Dec 2013 06:20:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=hqEbiQG/syGqnyDxtZqINlPAfBsZ+vkwJKC16hWW0/c=; b=Ri6XkOxiJigYhirnwK7n39hxa4gCuuCAPHYbXt/BfaSEMkftB+m/Q5ZiKX7FBZ1mbe XrrMzuCHHVnLooLc7dTJsYDG86iXvK5ds1YL7HrNP37svvv9zB9Fd/N7sXshJ0Q0dnRl fVW7k1vf6HUP0yQU4vmfJB1rCe17cYuOAOfr5R6a+IMns49DYm9x1792tj9hBxqI++k+ l72iUN34Hop2vqzGFxtfX6nexxJG6ugZvk9zC+7eGfJ8AZC96S0Uz1zzctAsXo4ruSU1 wrJmSx9G40d8sT6HZk3Scp663cPi7TQqfjOSaiwQuDZOW0piZU2kOzp7GXD5GIvmsYcj ajQw== X-Gm-Message-State: ALoCoQmislp75glhYbkhAFOz4HY/m5cQiRMXG8lJPaCwm5cOURyVlmyhsJoLgXQQ9f/4ub9FW5rR X-Received: by 10.224.137.68 with SMTP id v4mr43089846qat.77.1386166809255; Wed, 04 Dec 2013 06:20:09 -0800 (PST) Received: from [192.168.0.6] (d118-75-246-224.col.wideopenwest.com. [75.118.224.246]) by mx.google.com with ESMTPSA id w5sm49082841qat.10.2013.12.04.06.20.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 06:20:08 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: Need Information regarding Apache Webserver static file configuration From: Daniel Mikusa In-Reply-To: Date: Wed, 4 Dec 2013 09:20:07 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <42BDEF4D-186D-48EB-9EC1-568BF497AADD@gopivotal.com> References: <1386146601.45844.ezmlm@tomcat.apache.org> <529F2AD3.5030203@ice-sa.com> To: "Tomcat Users List" X-Mailer: Apple Mail (2.1510) X-Virus-Checked: Checked by ClamAV on apache.org On Dec 4, 2013, at 8:29 AM, Tapajyoti Roybarman = wrote: > Hi Andre, >=20 > Thanks a lot for the quick response. >=20 > In my httpd.conf file I have added the below settings. >=20 > ProxyPass / http://localhost:8080/ > ProxyPassReverse / http://localhost:8080/ >=20 > This is to connect Apache Webserver and Tomcat. In future I would add = more=20 > clusters and then modify the httpd.conf file accordingly. >=20 > Now because of this setting everything is being redirected to Tomcat. = Even=20 > the static files are displayed from my application stack inside Tomcat=20= > Webapps. >=20 > Now, if I want to just do the opposite (from what you suggested) and = add=20 > exceptions for files like jpg, png, css etc in my httpd.conf file, how = do=20 > I do that? See ProxyPass directive here. It tells how to exclude resources. Make = sure you read the part about properly ordering your ProxyPass statements = too. https://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass > Where in my Apache2.2 folder structure do I keep the static=20 > contents? In your htdocs (i.e. DocumentRoot) folder. Exactly where under that = folder just depends on where your application expects it. If your app = stores static resources under a "static" folder (i.e. = /static/images/...) then you'd just create that folder structure under = the htdocs folder. Dan >=20 > Hope I was able to make my question clear. >=20 > Eagerly waiting for your response. >=20 > Thanks and Best Regards, >=20 > Tapajyoti Roy Barman > Ph:- +919433040094 > Mailto: tapajyoti.roybarman@tcs.com > ____________________________________________ > Experience certainty. IT Services > Business Solutions > Consulting > ____________________________________________ >=20 >=20 >=20 > From: > Andr=E9 Warnier > To: > Tomcat Users List > Date: > 12/04/2013 06:45 PM > Subject: > Re: Need Information regarding Apache Webserver static file = configuration >=20 >=20 >=20 > Tapajyoti Roybarman wrote: >> Hi, >>=20 >> Could you please let me know that how can I serve static content like=20= >> image files, css files through Apache Webserver instead of Tomcat?=20 >=20 > That is the normal thing that an Apache httpd webserver does. >=20 > Please >> let me know about all the required configurations in detail. >=20 > That infomation is available on-line : = http://httpd.apache.org/docs/2.2/ >=20 > I am >> connecting Apache webserver and Tomcat using mod_proxy_http module. >=20 > Right. So *unless you specify otherwise*, all content will be served = by=20 > Apache httpd. > It is only *when you explicitly specify otherwise* that Apache httpd = will=20 > forward some=20 > requests to Tomcat. >=20 > Sugestion : from your Apache httpd configuration, > 1) start by removing anything that refers to mod_proxy_http. > Once you have done that, *everything* will be served by Apache httpd=20= > (image files, css=20 > files, html pages, everything). > 2) once you have succeeded in the above, /then/ re-introduce your=20 > mod_proxy_httpd-related=20 > statements, to *selectively* forward some URLs to Tomcat. > Et voil=E0 ! >=20 > It reminds me a bit of the story about a sculptor, who was aked how he=20= > sculpted a horse=20 > from a big block of stone. He answered that it was very easy : you = just=20 > remove from the=20 > stone everything that is not a horse. >=20 > Also, >> please find below some information that you may require. >>=20 >=20 > That was good of you to supply this information. Many people do not, = and=20 > that always=20 > causes delayed responses. >=20 >=20 >> Apache Webserber Version - 2.2.25 >>=20 >> Apache Tomcat Version - 7.0.27 >>=20 >> OS - Windows 7 >>=20 >> Thanks in advance, >>=20 >> Best Regards, >>=20 >> Tapajyoti Roy Barman >> Ph:- +919433040094 >> Mailto: tapajyoti.roybarman@tcs.com >> =3D=3D=3D=3D=3D-----=3D=3D=3D=3D=3D-----=3D=3D=3D=3D=3D >> Notice: The information contained in this e-mail >> message and/or attachments to it may contain=20 >> confidential or privileged information. If you are=20 >> not the intended recipient, any dissemination, use,=20 >> review, distribution, printing or copying of the=20 >> information contained in this e-mail message=20 >> and/or attachments to it are strictly prohibited. If=20 >> you have received this communication in error,=20 >> please notify us by reply e-mail or telephone and=20 >> immediately and permanently delete the message=20 >> and any attachments. Thank you >>=20 >>=20 >>=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org