# Proxy Cache

**URL:** <https://www.ruby-forum.com/t/proxy-cache/184985>\
**Category:** NGINX\
**Created:** [March 11, 2010, 12:50pm UTC](https://www.ruby-forum.com/t/proxy-cache/184985 "2010-03-11T12:50:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_KaSSSSpar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9e8a1a/32.png) [@Jan\_KaSSSSpar](https://www.ruby-forum.com/u/Jan_KaSSSSpar)\
**Post date:** [March 11, 2010, 12:50pm UTC](https://www.ruby-forum.com/t/proxy-cache/184985/1 "2010-03-11T12:50:03Z")

</div>

Hello,

I am using MS IIS web server as image web. Right now I cannot change  
to another solution because of special plugiunens that are used.  
I have problem with caching images. There is over 500 000 and IIS  
doesnt have so hight performance. I woul like to use nginx to cache  
most viewed pictures. Is ti posible to do that? Can I run nginx on  
same server as IIS? can someone help me with configuration?

How to configure nginx to use cache only for pictures,  
how to configure expire time.

what about ports? I think nginx will get port 80 and IIS change on  
oanother one 81. so inet users will ask nginx and it wil ask IIS in  
backend?

Thanks for help.

Jan

---

<div class="post-metadata">

**Author:** ![Jan\_KaSSSSpar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9e8a1a/32.png) [@Jan\_KaSSSSpar](https://www.ruby-forum.com/u/Jan_KaSSSSpar)\
**Post date:** [March 11, 2010, 4:33pm UTC](https://www.ruby-forum.com/t/proxy-cache/184985/2 "2010-03-11T16:33:42Z")

</div>

Hi Jan,

You can do all that with nginx.

Check out these sites for more infos:

> <https://serverfault.com/questions/30705/how-to-set-up-nginx-as-a-caching-reverse-proxy>

[http://wiki.nginx.org/NginxHttpProxyModule#proxy\_cache](http://wiki.nginx.org/NginxHttpProxyModule#proxy_cache)

You’re right for the ports, you should setup nginx on port 80 and IIS on  
another (81 or 8080).

Good luck!  
GFK’s

Jan KaÅ¡par a Ã©crit :
