Results 1 to 3 of 3
  1. #1

    Effective 30x redirection before apache requests


    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?

    Thanks for any advice.

  2. #2
    Join Date
    Apr 2003
    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 - Server Administration and Security - Managed VPS and Dedicated Servers with VIP Service

  3. #3

    Thanks for your suggestion - indeed nginx seems the way to go.

    As reverse proxy it will work as a mirror for the redirects and
    also serve some static media still on the server.

    The point about the CDN is, that only parts of my static media are hosted
    there - some is hosted by 3rd party hosts, where i have only
    minor or no control about the physical storing.

    Thats the point, why i need this redirect structure. With a pure, 100%
    CDN network all would be alot easier, yes. But sadly reality is often different.

    But with a effective redirect structure, the load will not reach my server anyway.

Similar Threads

  1. Cpanel Reseller Hosting, 30x Promo. 24/7 Live Support
    By Zanz in forum Reseller Hosting Offers
    Replies: 0
    Last Post: 10-19-2008, 11:28 PM
  2. # of Apache requests - modify?
    By niemie in forum Hosting Security and Technology
    Replies: 6
    Last Post: 02-10-2007, 10:32 PM
  3. Many apache and sql requests
    By ManXP in forum Dedicated Server
    Replies: 29
    Last Post: 02-01-2007, 06:08 AM
  4. Strange requests for apache
    By comafish in forum Hosting Security and Technology
    Replies: 5
    Last Post: 01-01-2006, 02:29 PM
  5. Apache - requests currently being processed
    By Shenron in forum Hosting Security and Technology
    Replies: 6
    Last Post: 09-07-2004, 02:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts