On peut créer, à des fins de déboguade, un proxy simple à l'aide de NetCat (commande nc). Pour cela, rajouter dans le fichier httpd.conf :
Listen 127.0.0.1:8080
Relancer Apache, puis taper, en tant que root :
# mknod backpipe p # nc -l -p 80 < backpipe | tee -a in | nc localhost 8080 | tee -a out > backpipe #
Les fichiers in et out contiendront respectivement les requettes effectuées et les pages reçues par les navigateurs Web.
GET http://www.linux-france.org/ HTTP/1.0 Proxy-Connection: Keep-Alive User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.2 i386) Host: www.linux-france.org Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8
HTTP/1.0 200 OK Date: Wed, 27 Mar 2002 12:45:14 GMT Server: Apache/1.3.19 (Unix) PHP/4.0.6 mod_perl/1.25 Content-Type: text/html X-Cache: MISS from wwwcache.uvsq.fr Proxy-Connection: close <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Linux France</title> <meta name="keywords" content="linux, francais, français, france, gnu, gpl, fsf, rms, stallman, debian, redhat, slackware, mandrake, caldera, freebsd, document, documentation, logiciel, libre, informatique, free, software, opensource, open, source, sourceware, freeware"> <meta name="description" content="Linux France : documents en français"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> [...]