Apache mod_proxy

I have a server acting as a web server and as a firewall for the LAN. In the LAN I have a test machine where I set up a web server as well and I need a firewall to forward requests on a specific domain name to that test machine in the LAN. I have only one IP for the whole network so (as I believe) I can not make much use from firewall.

This time mod_proxy saved me :)


<virtualhost *:80>
ServerName test.doman.name
ServerAdmin my@email.here
DocumentRoot /var/www
ProxyPass / http://ip.of.the.test.machine/
ProxyPassReverse / http://ip.of.the.test.machine/
</virtualhost>

This way when I access test.domain.name I am get a / of my test machine web server

Sanity check failure

Few times I faced the problem while running configure scripts that were telling me:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

since I am not in the mood of searching google for the solution every time this happens I decided to post a reminder here.

The idea is that “gcc-c++” (or similar thing I believe) have to be installed. Anyway - I solved problem by running:

apt-get install gcc gcc-c++