Iv recently been playing with building my own android rom for my nexus 4. So i figured id lay it out in a nice easy to read format.

I had great trouble getting this working initialy, mainly due to how OVH gives out failover IP.  Here is the solution i came up with.

h--- layout: post status: publish published: true title: Setup a pirate bay proxy author: display_name: jon login: jon email: jon@fattylewis.com url: '' author_login: jon author_email: jon@fattylewis.com excerpt: "Obviously this wont work at the moment, but heres how to build a pirate bay proxy.\r\n\r\n" wordpress_id: 12 wordpress_url: http://fattylewis.com/?p=12 date: '2015-01-29 22:42:15 +0000' date_gmt: '2015-01-29 22:42:15 +0000' categories: - Linux tags: [] comments: [] ---

Obviously this wont work at the moment, but heres how to build a pirate bay proxy.

This is a how-to on how to setup a pirate bay proxy on Ubuntu 12.04

Firstly, Install the dependencies –

apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl gcc make subversion

Next grab nginx

wget http://nginx.org/download/nginx-1.4.2.tar.gz

Download the substitutions4nginx source using subversion.

svn checkout http://substitutions4nginx.googlecode.com/svn/trunk/ substitutions4nginx-read-only

Extract the source.

tar xzvf nginx-1.4.2.tar.gz
cd nginx-1.4.2

Get ready to compile by configuring. Change the path of the substitutions4nginx-read-only directory to where you’ve downloaded it to. If you haven’t changed the path and are logged in as root it’ll probably be /root/substitutions4nginx-read-only/

./configure –add-module=/path/to/substitutions4nginx-read-only

Compile it. It’ll be installed to /usr/local/nginx/ by default.

make install

Test nginx is working by starting it then typing in your server IP in your web browser. You should see the “Welcome to nginx!” message.

cd /usr/local/nginx/

If its working, we’ll stop it so we can configure it.

./sbin/nginx -s stop

Rename the default config file so we’ve got a copy just in case something isn’t quite right.

cd conf
mv nginx.conf nginx.conf-backup

Download this config file.

wget http://proxybay.info/assets/proxy/nginx.conf

Test your config works by starting nginx.


Thats it. All working