If you have noticed since several weeks ago (if i recall it correctly because i completely forgot since when i enabled this although it’s not really that far lol) when you visited this domain name, sometimes you’ll see .nyud.net request appended on reaper-x.com (like images.reaper-x.com.nyud.net) and if you’re wondering on why there are several request made to that nyud.net domain? then here in this post i’m going to explain it
So basically .nyud.net is a domain name used by CoralCDN (a free Content Delivery Network) that allows you (as a website owner) to utilize their CDN Service to serve your content directly from their servers. And in most case, usually CoralCDN is used by many site owners when their website that is hosted on small server / shared hosting got linked from many popular website such as Digg, Slashdot, Reddit, etc. to help them survive the effect (Check this wikipedia page for more info) … although it can be used for any other purpose as well … like for example if you host your site from your own computer that doesn’t have enough bandwidth to supply all your site visitors, or just simply want to reduce the load on your server, or perhaps just to save bandwidth :D
And so without further ado, here’s on how to use CoralCDN as your personal site saver :)
Note: This is tested on Apache Web Server 2.2, and also make sure to enable mod_rewrite and mod_headers before continuing with this process
As for on how to enable mod_headers and mod_rewrite, just open your httpd.conf that is located in your Apache installation directory and locate this lines:
#LoadModule headers_module modules/mod_headers.so
#LoadModule rewrite_module modules/mod_rewrite.so
And remove the # character to enable them so it’ll looks like this
LoadModule headers_module modules/mod_headers.so
LoadModule rewrite_module modules/mod_rewrite.so
Now the process begin:
1. Locate the directory / folder where you placed all of your images and create (or edit if exists) the .htaccess file inside that directory (may be multiple depending on where you stored all of your static files)
2. Determine how you can access all of your static files using your browser. For example if you put all of your images under your Apache Document root/images/photo.jpg, that mean it can be accessed by typing http://www.example.com/images/photo.jpg on your browser
3. Insert these lines into your .htaccess file to redirect all the requests made to that images directory (based from the above example) to be served by CoralCDN and if you have reached your limit on CoralCDN, all the request will be reverted back to your site/server:
Header append X-Coral-Control "redirect-home"
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
RewriteRule ^images/(.*)$ http://www.example.com.nyud.net/images/$1 [R,L]
Alternatively, if you prefer to make all requests made by your self to not get redirected to CoralCDN (so that mean all of your site visitors will be served by CoralCDN but not you), you can use these instead:
Header append X-Coral-Control "redirect-home"
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.0
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
RewriteRule ^images/(.*)$ http://www.example.com.nyud.net/images/$1 [R,L]
And replace !^123\.456\.789\.0 with your IP Address
That’s it … and you’re done … now you can save your server resources and bandwidth by offloading all static images to CoralCDN, unless of course you want to completely offload your site to CoralCDN, which is described below
1. Locate the Document Root of your site
2. Create (or edit) .htaccess file on your document root
3. Insert these lines
Header append X-Coral-Control "redirect-home"
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
RewriteRule ^(.*)$ http://www.example.com.nyud.net/$1 [R,L]
And just like before if you want to exclude your self from being redirected to CoralCDN you can always add
RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.0
Before RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
But what if you get 500 Internal Server Error message after placing the above code? that means you haven’t enabled mod_headers and or mod_rewrite yet, or you mistype something … somewhere
p.s. Although it’s possible to use Conditional Check to make sure that even if you forget to enable mod_rewrite and mod_headers to not throw error message, but for this purpose i think it’s better not to use conditional check so you’ll know whether the redirection to CoralCDN is working or not … and if it’s not working because mod_headers and mod_rewrite not enabled, you’ll get a beautiful 500 Internal Server Error Message
p.p.s Be warned, there is a limit on CoralCDN (i’m not sure on how big/small the limits are) so whenever you’ve reached your limit you’ll get the amazing 403 Forbidden Error, but with the mod_headers placed when Coral return 403 error, all the requests will be reverted back to your site
Leave a response
f52
anybody mind to link pages for me so i can set up a private server? thx alot btw.
darn it whats “reaper-eazy-directory”
i suck sooo bad
can anybody link me anypages… please? im a newbie startin a server and want to know what are the steps. btw i hv downloaded an installed the WotLK patch till 3.2.2 (what todo what todo)
What is this?
http://reaperxzr.wordpress.com/
The tittle is REAPER-X .:[ ID ]:. OLD PAGE
As the title said :P That’s my old page before i moved into self hosted back then in 2006 too :D .. left there for archive purpose :P
I like your site! I never knew about it, lol.
http://www.reaper-x.net/
Actually it’s been there since 2006 lol … and beside that’s just a placeholder :P