Sunday, 18 February 2007

The fourth idea -- Linux Reverse Proxy Apache --

What have you need ?

  • What Computer models ?
    • Intel 486 family SX, DX, DX2 .....
    • Intel Pentium family , MMX, II, III ....
    • Intel Celeron family
  • Hardware components:
    • Base : Hard Disk Drive, CPU, RAM, Video Card, Floppy Disk & CDRom
    • RJ45 Network Cards ,
  • Operating System:
    • Linux !!!!!!!!!!!

Example --->

We have a PC like this one :
Pentium MMX 133Mhz, 64 Mb Ram, HD 512Mb, A Network Card 10 Mbps, CDRom 12x, SVGA max 800x600, floppy disk, Monitor 14'', Keyboard and mouse.

Installation Ubuntu Operating System following the post link

"......A reverse proxy is a gateway for servers, and enables one web server to provide content from another transparently. As with a standard proxy, a reverse proxy may serve to improve performance of the web by caching; this is a simple way to mirror a website. But the most common reason to run a reverse proxy is to enable controlled access from the Web at large to servers behind a firewall........." [referrer]


Installation Apache on Ubuntu

If your ubuntu system is connect to internet, follow these steps :
  • type the command # sudo apt-get install apache2 ;insert the root password to continue
  • insert the media Ubuntu cdrom
  • test your web server with a browser ;insert url http://192.168.66.156
The example scenario :





Configuring Apache Web Server
  • type these commands to enable proxy and rewrite modules:
  • # sudo a2enmod proxy ;insert the root password
  • # sudo a2enmod rewrite
  • # sudo a2enmod proxy_http

  • # sudo /etc/init.d/apache2 restart
  • create the file test.conf in directory /etc/apache2/conf.d
  • # sudo vi test.conf
  • insert in the file :

  • NameVirtualHost 192.168.66.156:80
    ''
    ServerName test.apache.local

    Order deny,allow
    Allow from all

    RewriteEngine on
    ProxyPass / http://www.cisco.com/
    ProxyPassReverse / http://www.cisco.com/*
    '
    '
  • test your reverse proxy with a browser ; insert the url http://test.apache.local/
Note: for this test insert in Operating System file hosts the directive:
[Ip Address ] test.apache.local
for windows "c:\[windir]\system32\drivers\etc" and for linux "/etc/hosts" .

Labels: , , , ,