How to block TOR exit nodes from accessing your website on Apache and Nginx

If you ever want to block TOR users from your accessing website completely or block them from accessing specific file(s) / location(s) only for any reasons you may have and you’re running Nginx or Apache, hopefully this post can help you with that.

First thing first, the command used here for both Apache and Nginx were designed to be use in cron because TOR ip often change. But make sure that it’s scheduled for 1 hour at minimum to respect those that gives you free service to lookup tor ip =)

Getting a list of TOR IP Addresses

Before anything else we need to get a list of TOR IP Address, and to do that we have two options (but of course feel free to use your own source if you have one):

  • Use TOR Bulk Exit List from Torproject
  • Use an external sites that list TOR IP Address such as from dan.me.uk

Note: dan.me.uk website only allow you to fetch it every 1 hour only (even if you accidentally clicked it), i choose to not link to the ip address url directly because of that reason and so you have to copy the url directly

How to Install Apache, PHP and MySQL on Windows Vista / Windows 7

This is a guide about Installing Apache, PHP, and MySQL on Windows Vista or Windows 7. Although setting up Apache, PHP and MySQL on Windows Vista / 7 is pretty much the same like setting up Apache, PHP and MySQL on Windows XP, it seems some people are having problem with it, although the only difference between those two is just there is User Account Control (UAC) in Windows Vista that basically prevent you from writing / editing files inside Program Files directory if you aren’t opening that files with Admin priviledge even if your account is in Administrator group. And this guide tells you how to configure Apache, PHP, and MySQL even when you installed it to Program Files directory without disabling UAC

Before we begin … this guide is compatible and has been tested with Windows 7 although the screenshots used here is showing the installation process under Windows Vista but that’s because back when i write this i’m still using Vista

Also it doesn’t matter whether you have x86 or x64 version of Vista / 7 installed. The only difference in this case is, if you’re running the x64 version, the Program Files directory for 32-bit program is called Program Files (x86)

And here goes the guide…

How to install Apache, PHP, and MySQL on Windows XP

So basically this is a rewrite of my previous guide but with a more proper method and beside you can find all the information you need on installing Apache, MySQL and PHP on a single page without going to another page unless you’re running Windows Vista / 7 of course

Anyway to make things short, let’s begin the guide on Installing Apache, PHP, and MySQL on Windows XP so i don’t waste your precious time ;)

Prerequisite

Apache HTTP ServerDownload Apache – See the update right below this before downloading

PHP for WindowsDownload PHP – See the update right below this before downloading
Make sure to download the Thread Safe version

How to optimize and speed up WordPress

If you’ve been reading the web recently you might already noticed that your site loading speed affect your search rankings as written by Google Websearch team. Although previously i’ve wrote about the same topic in the past, i decided that perhaps a rewrite with proper formatting would be better and although the title says WordPress, most of the instructions listed here can be applied to non WordPress based sites too

And before i begin, i need to mention that in order to use this you need to enable specific Apache Module or it’s not going to work at all. And i choose to not include the conditional check to make sure that the rule being applied is working as it should (assuming that you’ve typed everything correctly) or else you’ll get 500 Internal Server Error Message (if the required module is not enabled or being disabled by your web host) which is going to be useful especially if you’re in Shared Hosting. But unfortunately if you’re on shared hosting some of the tips here can’t be applied because of the limitation from shared hosting itself

And with the above said, let’s begin the WordPress Optimization ;)

Enable Deflate / Gzip

If you have full control of your server (VPS or Dedicated) or sure that mod_deflate and mod_setenvif is installed and enabled by your web host (Shared Hosting), by using this method you can reduce your page size and in the end your visitor will benefit from faster loading times due to smaller page size and all you have to do is just put this in your .htaccess file

How to use CoralCDN to help reduce bandwidth usage / server resources

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

How to redirect visitors to a temporary Maintenance Page

Ever want to redirect your site visitors to a temporary maintenace page while you’re doing some maintenance behind the scene, but you don’t know how?.

The answer to that problem is simple, as long as you have access to edit your .htaccess file (some web hosting company doesn’t allow you to edit the .htaccess file, and that’s why i tell you beforehand) :)

And here are the complete instruction :

1. Create a new html page saying that this site under maintenance or anything you like :) , and save it as maintenance.html (this is just an example, feel free to use another filename)

2. Edit your .htaccess file in your root public_html directory

Installing and Setting up Apache 2.2 series with PHP 5 on Windows

Update: Please see the new post about Installing Apache, PHP, MySQL on Windows XP (for XP users) or Installing Apache, PHP, MySQL on Windows Vista or Windows 7 (for Vista and 7 users) for a better and more detail guide

Previously i wrote a how to guide on installing Apache 1.3 on Windows machine. But it seems that some people prefer to use the new Apache 2.2 series instead of the old httpd 1.3 series which is not good when used on production system (read: if you allow anyone to access your webserver), beside the apache website itself tell you this :

the older 1.3 series was never designed to run on Windows, but that support was ‘hacked in’, introducing a large number of potential thread saftey issues and other confirmed problems.

And that’s why i choose to create the apache guide again but this time it is using the 2.2 series, and of course this guide tell you on how to setup your apache server with php 5 manually not using an all in one package. And here’s the guide :

How to hide affiliate links using htaccess

Today i’m going to tell you on how to hide your affiliate links or any other links you want to hide (see the right sidebar of this site) using a simple htaccess redirect trick, just in case you didn’t know about it, and of course i’ve only tested this on Apache HTTP Server only (Windows and Linux version) so if you’re using any other webserver to serve your webpages … i’m quite sure that this trick is not going to work, and you’ll have to use some redirect script to do it

But as a side note, this redirect trick (or any other redirect trick using php, etc) may or may not working especially if your site mostly visited by tech savvy users even if the affiliate website itself didn’t show your referal link, because they can always see it through the HTTP header

(more…)

Client denied by Server Configuration

This is perhaps might be useful especially to those who’s using managed server / managed vps (or have anything related to core system component installed and configured for you) and keep seeing client denied by server configuration message on your site error_log (via CPanel or other method) … because that’s what happened to me today

I keep seeing someone trying to access this site and get blocked immediately, but what makes it strange this error message only appear on some of my pages. Although when i tried to access those pages, i can see it without problem at all (yes, i have mod_security installed), so that mean there’s something wrong somewhere in my apache configuration because if it’s caused by hotlink protection, i already make sure it still can be viewed by those who’s blocking their referer address

(more…)