Created
November 28, 2013 23:15
-
-
Save alexbilbie/7699277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################################################################### | |
# PrimeWireProxy.co.uk - a reverse proxy to allow blocked users access to PrimeWire.ag. | |
# | |
# When ever a proxy falls victim to internet censorship, another needs to replace it. A single, | |
# cheap ($15 per month) VPS is all you need to provide this service to others. NGINX is brilliant | |
# for this and will serve thousands of requests with no trouble. Just replace `primewire.ag` and | |
# `primewireproxy.co.uk` below to suite your needs. | |
# | |
# Say NO to Internet Censorship! | |
# | |
worker_processes 4; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
charset utf-8; | |
charset_types text/css application/json text/plain; | |
keepalive_timeout 60; | |
server_tokens off; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay off; | |
gzip off; | |
# disable all logging | |
access_log off; | |
error_log /dev/null; | |
# | |
# Redirect (www to non-www) | |
# ============================================================================================== | |
# | |
server { | |
listen 80; | |
server_name www.primewireproxy.co.uk; | |
return 301 http://primewireproxy.co.uk$request_uri; | |
} | |
# | |
# PrimeWireProxy.co.uk | |
# ============================================================================================== | |
# | |
server { | |
listen 80; | |
server_name primewireproxy.co.uk; | |
location / { | |
# replace original domain with that of the proxy's | |
sub_filter_once off; | |
sub_filter 'www.primewire.ag' 'primewireproxy.co.uk'; | |
proxy_set_header Accept-Encoding ''; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://www.primewire.ag/; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment