<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I'm still relatively new to nginx but find it to be great.<br>
<br>
My high-level recommendation would be twofold:<br>
1) Make sure you define a "proxy_cache" (check the nginx website
for details on these directives). In there you can define further
how to cache anything that's even a bit "static" from tomcat. And
if you're overriding specific paths or regex'es from tomcat (like if
you know there are static images or something being served from your
webapp that you can't easily move out to the flat filesystem),
you'll want to add proxy_ignore_headers to override what tomcat is
telling the browser, add the proxy_cache_valid, the Cache-Control
header (see #2), and maybe "expires".<br>
<br>
2) For images and other truly static content, add_header
Cache-Control with some reasonable values. This will tell any
downstream proxies and the actual client PC's to cache those images
locally, so they won't be continuously fetched from your server.<br>
<br>
There is no "one size fits all", but the power contained in nginx is
really great. You just have to take some time to try the settings
and use something like fiddler on the desktop to see the differences
when you make changes. (Be sure to clear your local browser's cache
between tests!)<br>
<br>
Good Luck!<br>
<br>
<br>
On 12/7/2012 6:08 AM, Irfan Khan wrote:
<blockquote
cite="mid:002301cdd46b$2a660290$7f3207b0$@enovatemedia.co.in"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi pals,<br>
<br>
<br>
I have my applications running on tomcat and to improve
performance I have put nginx infront.Nginx proxy pass
successfully pass all request to tomcat server.<br>
<br>
There are some html static files and images in my application
which I don't to be served by tomcat. again, I am trying to as
much as performance boost for my app.<br>
<br>
I am tried to do some research but unable to get solutions.<br>
<br>
please see my current config ans suggest!<br>
<br>
server {<br>
index index.html index.htm;<br>
listen 192.168.0.16:80;<br>
server_name localhost;<br>
location / {<br>
root /var/www/nginx-default;<br>
index index.html index.htm index.jsp;<br>
}<br>
<br>
<br>
location /abc/ {<br>
proxy_pass <a moz-do-not-send="true"
href="http://localhost:8080">http://localhost:8080</a>;<br>
proxy_set_header X-Real-IP $remote_addr;<br>
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
proxy_set_header Host $http_host;<br>
<br>
}<br>
<br>
thanks in advance!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span
style="color:#548DD4;mso-fareast-language:EN-IN">Irfan
Khan</span></b><span style="mso-fareast-language:EN-IN"> <o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
</blockquote>
</body>
</html>