nginx and tomcat integrated but how to serve static files

Irfan Khan irfan.khan at enovatemedia.co.in
Fri Dec 7 11:08:20 UTC 2012


 

Hi pals,


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.

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.

I am tried to do some research but unable to get solutions.

please see my current config ans suggest!

server {
index index.html index.htm;
listen 192.168.0.16:80;
server_name localhost;
location / {
root /var/www/nginx-default;
index index.html index.htm index.jsp;
}


location /abc/ {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;

}

thanks in advance!

 

Irfan Khan 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121207/dbc227fa/attachment.html>


More information about the nginx mailing list