LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-28-2009, 07:54 PM   #1
Support_frog
LQ Newbie
 
Registered: Apr 2006
Distribution: RedHat Enterprise, CentOS, Debian Etch & Ubuntu
Posts: 3

Rep: Reputation: 0
Question Apache 2.2, Mod_rewrite and a cdn provider with a squid proxy cache


I have a general question and was wondering how and if someone has pulled this off. I am new to this so take it easy on the noob.

I am currently using vitalstream CDN provided by Internap and I am using a feature called origin pull which essentially acts as a squid proxy that caches my web content out to other servers globally.

I have a unique challenge in that I am needed to have my apache server serve as the origin host for the squid proxy cache to read, but also need direct requests to the site on the origin server to server content to another url (the CDN domain once the data is cached). Below is an example of a rewrite rule I am using:

Options Indexes FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP:Authorization} !(Basic\mybase64encryptedusernamepass)
RewriteRule ^/home/website/public_html/mydomain.com/(.*)\.(css|gif|jpg|jpeg|bmp|png|mp3|wmv|avi|mov|rm|exe|mpg|rar|zip|tif|tiff|txt)$ http://mycdndomain.com/$1.$2 [R,L,NC]
RewriteRule ^/home/website/public_html/mydomain.com/(.*)\.(css|gif|jpg|jpeg|bmp|png|mp3|wmv|avi|mov|rm|exe|mpg|rar|zip|tif|tiff|txt)$ http://mycdncomain.com/$1.$2 [R,L,NC]


Does anyone have any ideas on the best way to make this work?

Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
clearing cache on squid proxy shadowsurfer Linux - Newbie 9 04-15-2008 11:33 PM
Squid proxy or cache server? jonette20 Linux - Newbie 2 08-07-2007 08:27 AM
Squid : 1 proxy 3 cache bazet Linux - Networking 1 12-03-2006 04:03 PM
Squid Reverse Proxy Cache Question Gentoo20 Linux - Networking 0 02-04-2005 01:19 PM
Squid Cache & Filter without Proxy PersianPatient Linux - Software 4 11-24-2004 12:23 PM


All times are GMT -5. The time now is 04:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration