diff --git a/readme.md b/readme.md index 2d5b7bf..9d5f2ab 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -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