Archive of articles classified as' "Web Servers"

Back home

Google’s support for RDFa and Microformats

19/10/2009

Google has announced that their search engine is going to support enhanced searching in web pages, by using RDFa and Microformats embedded in XHTML. Google states that the extra (structured) data will be used in order to get results for Product Reviews (e.g. CNET Reviews), Products (e.g. Amazon product pages), People (e.g. LinkedIn profiles) and any other types of resources will be made public through the data-vocabulary.org. W3C is pretty happy about that.

The news are good for three reasons:

  1. Google supports an Open Standard (RDFa by W3C) and also an Open RDF Vocabulary
  2. Structured Data embedded in human readable web pages are going to start showing up. Content providers will start using RDFa or Microformats to get Google’s Rich Snippets in search results. Of course other Search Engines will follow :) Yahoo! already supports RDFa in SearchMonkey.
  3. One more big step towards the Semantic Web.

I suspect that data from RDFa or Microformats will be also used in some way by Google for Ranking search results and that a new SEO era is going to start. However it is too early to make predictions.

From my personal point of view, if RDFa is finally going to be widely adopted, it will be the first time that scientists will have a Web-scale distributed, structured data “playground” to do research on. Although I am not an expert in the field, I remember that Semantic Web and Large Graph processing had scalability problems (correct me if I’m wrong!). The Web Graph (that is as simple as “one page links another”) is going to be much more complex and semantically “meaningful”. I am very curious to see what comes next in this direction!

2 Comments

Run your own OpenID server – Installing Prairie on lighttpd

22/02/2009

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.


162 Comments

PTY allocation request failed on channel 0

20/02/2009

Yesterday, I was trying to login to my machine and I got the following message:

PTY allocation request failed on channel 0

My prompt was stuck and I could not enter commands. This happened because -for some reason- the tty related devices(/dev/ptmx, /dev/pts) were not created or mounted on my machine. In order to get this problem resolved, I created and mounted the missing devices using the following commands:

rm -rf /dev/ptmx
mknod /dev/ptmx c 5 2
chmod 666 /dev/ptmx
umount /dev/pts
rm -rf /dev/pts
mkdir /dev/pts
mount /dev/pts

In order to be able to execute commands you will have to login to your machine(isn’t this supposed to be the original problem :) ).
This will do the trick:

ssh user@host "/bin/bash -i"

My VPS is built on openVZ but I have seen this problem occur also in XEN machines.
Leave me a comment if this works for you!

89 Comments