Setup a Reverse Proxy – Linux

The_Pirate_Bay_logo

softtitledonwloadlinkhomepagecontactlicenceSoftware Title: Reverse Piratebay Proxy – Linux
Download Link: http://proxybay.info/assets/proxy/nginx-proxy.zip
Homepage: http://proxybay.info
Contact Them: http://proxybay.info/contact.html
License: Freeware open source project community driven.

1.) Once you’ve got your server set up and online you’ll want to get nginx installed.

a) Install the dependencies first, this is for a Red Hat based system.

yum install pcre-devel zlib-devel openssl-devel gcc make subversion

b) If you’re using a Debian based operating system you should use this.

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

2.) Download the source. Latest version is 1.2.0 as of 04/05/2012.

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

3. Download the substitutions4nginx source using subversion.

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

4. Extract the source.

tar xzvf nginx-1.2.0.tar.gz
cd nginx-1.2.0

5. 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

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

make
make install

7. 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/
./sbin/nginx

8. If its working, we’ll stop it so we can configure it. If you can’t connect to it, make sure there isn’t a firewall blocking it.
For testing, see this shell script. You should configure iptables properly later but its not something in the scope of this article, instead see here.

./sbin/nginx -s stop

9. 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

10. Download this config file and open it. Have a look at it here online first if you’re unsure.

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

11. Test your config works by starting nginx. If there isn’t any output then its started. If you get [emerg] errors, something needs changing. Usually the output will point you in the right direction. If you can’t figure it out, try searching the internet as there are a lot of resources – otherwise email with as much detail as possible.

./usr/local/nginx/sbin/nginx

If it works then submit it to The Proxy Bay by going to This Link.

———————————–

Remember you can also change the destination like on the windows config to point to h33t, kickasstorrents, eztv.it etc.
It doesn’t have to be http://www.thepiratebay.sx/se the choice now is up-to you!