I am sure that you have heard about OpenID. OpenID is an open, decentralized, free framework for user-centric digital identity. That means that you only need only one username in order to be able to login into many sites that support OpenID. Yahoo!, Google, Microsoft and many many others have expressed support and are already providers of this wonderful idea that is spreading every day.
With OpenID every user has one universal username that uses in every OpenID-enabled site. For example, my OpenID is “id.asteriosk.gr”. It is unique since I own the domain asteriosk.gr and I use it to log into this blog, and in many other sites that support OpenID login.
In order to be able to use openID you need an OpenID provider. That could be AOL, Blogger, Flickr, Wordpress and many many others. For example if aol is your provider, you will can use username like this: openid.aol.com/screenname to login to sites. If its Wordpress you have to use usernames like this: username.wordpress.com.
Having a provider that you trust is a very nice thing. However, when it comes to a universal username that you will use for every login on the internet, you might want to have your own personalized OpenID that is using your own domain name.
Having your own OpenID means that you are the provider of yourself. If you are the provider of yourself, you will have to use your own server and infrastructure to provide yourself OpenID services. Providing OpenID services to yourself, means that you have to be able to keep your site secure. Installing an OpenID server is quite easy but keeping it secure, is kind of tricky. If you want to run your own OpenID server, you can use one of the many OpenID servers out there.
In my case, I chose the Prairie server. It supports multiple users and it only needs PHP and MySQL. However, there were problems installing it. Prairie needs Apache to run. That’s because it needs .htaccess files in order to make those URL rewrites easier for Prairie’s developers. My server runs on Lighttpd, so the first problem that came up when trying to install Prairie was -as usual- lighttpd’s mod_rewrite module.
I followed Prairie’s instructions. The installation is pretty easy, you just need a MySQL username and password and a database where Prairie will save its data. After that you run the installed script and everything works as expected! The only difficult thing I had to overcome was to convert the .htaccess file so that lighttpd can understand what to do with those rewrites.
In my existing PHP-enabled server, I created a subdomain named id.asteriosk.gr and I put these rewrite rules to get it working:
<br />$HTTP["host"] == "id.asteriosk.gr" { <br /> server.document-root = "/opt/apps/prairie/" <br /> url.rewrite = ( "(.<em>.php|theme/|template/|install/).</em>" => "$0", "^/(.*)$" => "/index.php?$1" ) <br />} <br />
Another thing that you will have to have in mind is that Prairie, needs a special PHP library to run. The library is called bcmath and you will have to install it by hand or using your package manager. In my case (CentOS 5) I just run:
yum -y install php-bcmath
and restarted lighttpd. I also had to kill the existing php-fcgi’s that were already running.