Host Your Own Proxy Server

By Jimmy Bonney | January 28, 2008

Neurons network

I guess that you have already been in a situation where you couldn’t access some websites whether you are at school, work, library, or in some country that practices censure.

There are many proxies (thanks Korben for the info) that you can use to bypass these limitations but they can be slow and / or with a lot of ads and pop-up windows. But if you have your own web hosting, there is an easy way to avoid these drawbacks: install your own proxy1. In order to do so, you simply need:

  • A web hosting that allows you to execute cgi scripts.
  • The CGIProxy script written by James Marshall, available here.

Installation is pretty straightforward but here are a few words about it. The first thing is to identify where your server allows you to put PERL scripts. In most cases it is probably in the cgi-bin directory at the root of your website but for what I have read some web hosters allow you to put it anywhere. The second thing is to identify the PERL path and modify the first line of the file you have dowloaded according to this information. If you can access your webhosting through CPanel, look at the bottom of the home page and you may see something like Perl Path: /usr/bin/perl

Perl Server Info

If you have an SSH access, you can also try the command which perl. Most of the time, the path is the one given above or the one coming with the file.

Once you have transfered the nph-proxy.cgi to your server in the correct directory, you should be able to access it and see something like that:

Proxy Interface

Don’t hesitate to read the documentation on the author website since many options exist to customize your proxy. You can restrict access to some websites, ban some IP addresses to limit access to your proxy, customize the header of the pages accessed trough your proxy, etc…

  1. Of course, your website shoudn’t been blocked itself so that you can use it as a proxy. You can try to see if you can access your website from China here



For the time being, comments are managed by Disqus, a third-party library. I will eventually replace it with another solution, but the timeline is unclear. Considering the amount of data being loaded, if you would like to view comments or post a comment, click on the button below. For more information about why you see this button, take a look at the following article.