Archive for August, 2007

Using a reverse Proxy with a subdomain

Apache
Having an Apache server is really a great thing, every day you can discover something new:D Today I discovered that I can use a reverse proxy to point to a server behind my firewall. Even better I can use a subdomain to access it, which is exactly what I need.

So let’s see, what I need is that every request to a certain subdomain to be mapped to another server, with a private IP-Address. This is great because I only expose parts of my server to the Network that I want.

First things first: in the apache configuration, which is usually located at /etc/sysconfig/apache2 edit the APACHE_OPTS to contain -D REVERSE, -D PROXY and -D PROXY_HTML (actually the last one’s not needed as we wont be adjusting any URLs, but let’s keep it anyway).

APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D PERL -D PROXY_HTML -D REVERSE -D PROXY"

Now that we have enabled the proxy stuff, we can start configuring it. In the vhost directory (something like /etc/apache2/vhosts.d/) create a new file that will hold the configurationfor the subdomain:

<virtualhost your-ip-here>
        DocumentRoot /srv/www/subdomain/htdocs
        ServerName subdomain.domain.tld
        ServerAdmin webmaster@subdomain.domain.tld
        AccessFileName .htaccess
        ScriptAlias /cgi-bin/ /srv/www/subdomain/cgi-bin/
        ServerAlias subdomain.domain.tld sudomain
 
        <directory /srv/www/subdomain/htdocs>
                Order allow,deny
                Allow from all
        </directory>
 
        <directory /srv/www/subdomain/cgi-bin>
                AllowOverride None
                Order allow,deny
                Options ExecCGI
                Allow from all
        </directory>
</virtualhost>

Ok so by bow we have created the new subdomain, just to let apache shut up about missing folders we’ll create the required folder:

mkdir -p /srv/www/subdomain/{htdocs,cgi-bin}

What’s missing now? Right, the reverse Proxy :) so we have to add two new lines to the definition above:

       ProxyPass / http://internal-ip-address/
        ProxyPassReverse / http://internal-ip-address/

That’s it! Just put the above before the Closing VirtualHost tag and it should work just fine.

SSCP, Systems Security Certified Practitioner provides an ideal training for IT specialists and trainers for the maintenance of security system. JN0-310, juniper certification exams are considered one of the best certification exams for IT personnel. HP0-W02 stands for Implementing HP StorageWorks EVA Solutions certification exams training which a valuable exam is for IT candidates. HP0-752 provides full training for IT professionals in authentic way. HP0-096 certification exams are designed to develop professional perfection in IT specialists and technicians. 9A0-044, ADOBE ACE Photoshop CS2 certification exam is very valuable for web developers and designers to enhance the professional skills. 920-136 certification exams are one of the leading exams to enhance the knowledge and professional skills of IT professionals.
Did you like this? Share it:

Goodbye MySpace & Co., welcome Portable Social Networks

The most successful sites right now on the Web are social networks, no point denying it. Social Networks,such as MySpace, Facebook and Co., are huge information silos that only reluctantly share this information with other services on the Web, every time I sign up to a new Social Network, a thing many of us do regularly, I have to re-enter all my information, re-set the notifications, re-upload my images and re-search all of my contacts to this new network. But MySpace & Co are doomed, the very fact that they limit the scope of a friendship as I like to call it will soon destroy them, they are not portable.
And here comes the nice thing: I already have a profile, I have a site, a blog or anything were I can put a little information about myself can be me profile for a portable social network, and the best thing is that I decide what to disclose to who, and how it should look, without having to hack those awful Stylesheets for predesigned social networks that won’t look nice anyway, I can decide everything by myself!
With the advent of OpenID we have every tool we need to create a portable, peer-to-peer styled, social network, no central authority that will control us, no need to ever sign up to a social network ever again. A portable social network is like a super-set of all existing social networks and it is truly global.
And there’s also a pretty good standard for the most important feature in social networks: friend relations. It’s called XFN, and is a simple, yet powerful extension to XHTML. And with microformat -magic we can do a hole lot of things most social networks aren’t able to do.
So join today, the last Social Network you’ll ever have to join, simply by adding some information about youself, some pictures or whatever you want to your OpenID URL and tag links to your friends’ Profile with the XFN Attributes and you’re done :)

For more on the topic of Portable Social Networks I recommend reading some of the following posts:
Did you like this? Share it: