I have a special problem.
I own a dedicated server with a /29 subnet.
I host there like 10+ websites with a apache2/vhost system using
mod_fcgid/mod_suexec. All works fine and smooth.
Now, my problem: Alot of that websites have banner/buttons which
are included on other websites like for example the facebook like
That banners/buttons will come naturally with a picture.
I have a special CDN/host for that pictures.
All what i do is a 30x redirect when a request comes.
Naturally, that banners/buttons are included on some high traffic
websites invoking alot calls to the server.
That is no problem ATM, its still extremly fast, but there are 2 points:
1.) Every redirect is handled by the single vhosts apache
threads, invoking in the fcgid/suexec enviroment a split to the
different apache threads
2.) it spams the apache access logs with alot messages
Note: The OTHER websites include MY graphics by
<mysite>.com/banner.gif. Thats a must to hold control over the
delivered banners (perhaps i will sell the site later or change
the physical storing), i can't give them a direct link to the CDN
nor any other tricks. Its urgent, that the call goes to my
domain, even i redirect and its not physical stored on that domain.
So, what i want is this:
- a program/apache mod which sits before my vhosts threads and
catches all incoming calls on port 80 to my different websites
and different IPs. It will filter out the redirects and process
them and let through all the other calls so the apache can work
them out. Of course it should also direct all messages about the
redirects to an own log.
Well, sorry for that long and explicit description, but its my
problem that i found alot tutorials about proxy and redirects
but not a single one about my special setup.
But i can't believe that i am alone with this pretty common setup.
I know there are some programs which should can do it - but what
is the fastest and easiest to do it?
Adding a full reverse proxy or can it be done with nginx in front?
Nginx can work as a reverse proxy and if I am understanding you do what you are looking at. You also can look at varnish, a reverse caching proxy. Note in both cases all of the bandwidth will flow through your server - so using a CDN is going to be pointless since its the nginx or varnish that requests it.
With nginx you could setup a redirect that will send them off to another url, but it sounded like you wanted to do this without giving them a new url.
Also keep in mind having a few different urls/subdomains can be useful for speeding up your page.
John W, CISSP, C|EH
MS Information Security and Assurance ITEagleEye.com - Server Administration and Security Yawig.com - Managed VPS and Dedicated Servers with VIP Service