Archive for April, 2006

Reverse proxy of virtual hosts with apache 2

Posted in Linux SysAdmin on April 21st, 2006 by Johan Huysmans – 6 Comments

Ok, here is the situation:
We have a gateway connected to the internal network and the internet. We have one public ip and several dns names. The dns names *.x-tend.be are linked to the public ip address of the gateway, *.internal.x-tend.be are linked to the servers on the internal network.

This is what we want to accomplish:
You browse to a url from the internet and you get the website from the server located on the internal network. When you browse to another url, you get a different website from the same server on the internal network.

The first step is to configure the internal server. It is a normal virtual host configuration.
red.internal.x-tend.be and blue.internal.x-tend.be are linked to the same server. But you will get a different webpage.

The second step is the configuration of the gateway. It is also based on a virtual host configuration.
red.x-tend.be and blue.x-tend.be are linked to the gateway, and each has his virtual host. In that virtual host declaration you say it has to reverse-proxy to red.internal.x-tend.be and blue.internal.x-tend.be.

A basic configuration on the gateway can look like this:

NameVirtualHost *:80

<VirtualHost *:80>
     ServerName blue.x-tend.be

     ProxyRequests off
     ProxyPass / http://blue.internal.x-tend.be/
     ProxyPassReverse / http://blue.internal.x-tend.be/
</VirtualHost>

<VirtualHost *:80>
     ServerName red.x-tend.be

     ProxyRequests off
     ProxyPass / http://red.internal.x-tend.be/
     ProxyPassReverse / http://red.internal.x-tend.be/
</VirtualHost>

New version of counterize

Posted in WordPress on April 12th, 2006 by Johan Huysmans – Comments Off

This morning the new version of counterize has been released by Anders.
You can find the releasenotes a.k.a. blog entry here.
As you can see, the changelog is my patch, nice hé ;)

I also added Anders’ blog to my blogroll (it’s one of those bloks at the right)

counterize patch 3: excluding users with an admin webinterface

Posted in WordPress on April 7th, 2006 by Johan Huysmans – Comments Off

Last weekend I created the biggest part of the patch.
I coded the webinterface that allows you to select one or multiple users that may not be counted. These users are saved into the database and compared to when someone hits a page.

During this week I created 3 extra buttons for the webinterface.
One that allows you the select every users, one that allows you to select no users, and another one that resets the form.

Screenshot

You can find the patch here, enjoy!
I didn’t spent much time debugging it, so if you find an error, please let me know.