The situation:
At home I’m running a Windows 2008 server (Exchange 2007 and mostly file sharing) that is also hosting two virtualized Debian environments: webserver and mail server.
As all HTTP trafic is serviced by the Debian machine, I had to figure out a way to forward all the traffic for www.elconsultancy.nl to this 2K8 machine (running IIS). Why…trying to make my first steps into the SilverLight world.
The solution:
As most stuff also this could be handled really easy by using the reverse proxy. Two steps to handle this:
1) Edit the Virtual Hosts file:
<VirtualHost 192.168.50.80:80>
ServerName www.elconsultancy.nl
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://192.168.50.1/
ProxyPassReverse / http://192.168.50.1/
</VirtualHost>
2) Enable the proxy module:
a2enmod proxy_http
Yeah, it really is that easy !
February 20th, 2009
admin
For running multiple sites on your box, you have to do something with configuration. What I did is (in my opinion) a nice way:
create a file called /etc/apache2/conf.d/virtual.conf
include the following text:
#
# We’re running multiple virtual hosts.
#
NameVirtualHost [your IP]:80
Now you can create a file in your /etc/apache2/sites-available map called (in my case) e-miel.net with the VirtualHost tag pointing to the NameVirtualHost mentioned above:
<VirtualHost [your IP]:80>
With this no errors will be logged after restarting Apache2.
Btw, I ran into this error:
_default_ VirtualHost overlap on port 80
It seems that /etc/apache2/ports.conf also contains a “global” (don’t know for sure if that is the correct word) variable that holds the NameVirtualHost value.
February 18th, 2009
admin
Though being a fulltime Microsoft .NET developer I decided to change my blogging environment from dasBlog to WordPress (on a Debian host).
After configuring the machine it seemed to work smoothly but from time to time Apache2 was not responding to any requests (though the mail server was running perfectly).
It turned out that by using <Virtualhost *> (yes, I definitely am lazy !) the problem was caused by my second not used nic. Disabling this one did the trick, the server is up and running 24/7.