So, how to configure a Forward Proxy on your desktop ?
First you'll need a http server : Apache.
You can download a ready to use version like WampServer
Install it then edit the file httpd.conf to configure our proxy for our need
First the proxy itself
find and uncomment these 3 lines
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
add/update these lines
<IfModule mod_proxy.c>
#enable forward proxy
ProxyRequests On
#enable any address to use the proxy
<Proxy *>
Allow from all
</Proxy>
</IfModule>
you limit the valid address using
Order deny,allow
Deny from all
Allow from
you could also use mask, domain name and UserAgent filter
To only allow Nokia phones, use 194.137.80.*
You could also define the allowed ip on the
Second, optional, add the UserAgent in log
be sure you have
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
and uncomment
LoadModule logio_module modules/mod_logio.so
CustomLog "logs/access.log" combined
(note 'combined' reference to LogFormat xxxx 'combined' ... and adjust the path of the log to access.log)
comment
#CustomLog "c:/wamp/logs/access.log" common
to avoid mix of the 2 logs
Third, to log POST/GET data on the error.log (not on the acces.log)
uncomment
LoadModule dumpio_module modules/mod_dumpio.so
and add
<IfModule dumpio_module>
LogLevel debug
DumpIOInput On
DumpIOOutput On
</IfModule>
Then, put it online using, on <Directory "???/www">
Order Allow,Deny
Allow from all (or any specific IP/domain/mask like 194.137.80.*)
and not
Order Allow,Deny
Deny from all
Allow from 127.0.0.1
on WampServer, it will give you
No comments:
Post a Comment