Skip to content

Commit

Permalink
updated formatting and other details
Browse files Browse the repository at this point in the history
  • Loading branch information
buonzz committed Apr 18, 2014
1 parent d74b0be commit dff789e
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@

A simple PHP script that can be used as a ReverseProxy. Although you can use Nginx, mod_proxy or a dedicated software like Squid for this purpose, there are instances that you favor the ability to just do it in a PHP script that can be dropped in a single folder. There could be various reasons:

*You are in a shared hosting wherein tweaking server-wide stuffs is not possible
*For some reason, you have to serve the contents of a subdomain to be as sub-folder of another. For example you have site.yourdomain.com (server 1 ) and you want it to be accesible as www.domain2.com/site in *another* server
*You wanted to cache the contents
*The web server is unaccessible publicly
*You want to provide a simple proxyserver
*Visitor's country is restricted from visiting the actual site
*Anonymize your users
* You are in a shared hosting wherein tweaking server-wide stuffs is not possible
* For some reason, you have to serve the contents of a subdomain to be as sub-folder of another. For example you have site.yourdomain.com (server 1 ) and you want it to be accesible as www.domain2.com/site in another server
* You wanted to cache the contents
* The web server is inaccessible publicly
* You want to provide a simple proxyserver
* Visitor's country is restricted from visiting the actual site
* Anonymize your users


Requirements
============

* PHP >= 5.2
* Apache mod_rewrite enabled
* cURL extension enabled


Installation
____________
============

Use composer to install it

Expand All @@ -23,10 +32,10 @@ edit config.php
define('PROXY_SUBFOLDER', 'reverseproxy');
define('FOLLOW_LOCATION', FALSE);

MASKED_DOMAIN is the site where this script will be getting its contents from, should have no traliling slashes.
PROXY_SUBFOLDER this is in case you had placed your script in a subfolder, like for example http://www.yourdomain.com/reverseproxy
* MASKED_DOMAIN is the site where this script will be getting its contents from, should have no traliling slashes.
* PROXY_SUBFOLDER this is in case you had placed your script in a subfolder, like for example http://www.yourdomain.com/reverseproxy
Leave this to blank if you had placed this in the root of the domain
FOLLOW_LOCATION - indicates whether the script will follow the redirect returned by the source site
* FOLLOW_LOCATION - indicates whether the script will follow the redirect returned by the source site

edit .htaccess

Expand Down

0 comments on commit dff789e

Please sign in to comment.