LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Squid vs Apache2

[ILUG] Squid vs Apache2

Colm MacCarthaigh colm at allcosts.net
Mon Jan 7 23:30:18 GMT 2008


On Mon, Jan 07, 2008 at 09:31:31PM +0000, Maciej Blizi??ski wrote:
> On Fri, 2008-01-04 at 11:16 +0000, Bernhard D Rohrer wrote:
> > I have always wondered why people use Squid, when Apache2 also has proxy 
> > functionality. Performance?
> 
> Maybe because you can't make upside-down-ternet with Apache?
> 
> http://www.ex-parrot.com/pete/upside-down-ternet.html

Erm, sure you can :-)

	RewriteRule .*\.(jpeg|jpg|png|gif)$ /path/to/upsidedowner [NC]

and;

	#!/bin/sh

	imgformat=`echo $REQUEST_URI | awk -F. '{print $NF}' | tr 'A-Z' 'a-z'`

	test $imgformat = "jpg" && imgformat="jpeg"

	echo "Content-Type: image/$imgformat"
	echo 

	wget -q -O - "$SCRIPT_URI" | convert -flip $imgformat:- $imgformat:- 


(E & OE, you get the idea, oh and without the strict rewrite rule the
above cgi would be a trivially-exploitable security hole)

Although it would be more efficient to use mod_ext_filter, and
reasonably trivial too :-)

-- 
Colm MacCárthaigh                        Public Key: colm+pgp at stdlib.net



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell