Archive for the 'World Wide Web' Category

Goodbye, Apache; hello, lighttpd!

Fed up with how Apache memory usage grows (and grows, and grows), I’ve changed all of my sites on my external server (where, for instance, this very blog is hosted) to lighttpd, a.k.a. Lighty.

I began by changing the most problematic site to Lighty (listening on port 81), and using Apache’s proxy module to redirect it there. After the results were promising, I went and changed each site at a time, dealing with the particular problems of each (I use lots of redirects, and the syntax is a bit different, and, furthermore, Lighty doesn’t support .htaccess files.

WordPress was relatively easy (just one line). MyBB would have been even easier (nothing to do), if not for the fact that I use an SEO mod which uses an .htaccess file for nicer URLs. But everything was easier than I expected.

After each site had been “moved”, it was just a matter of stopping Apache and moving Lighty to port 80.

Memory usage is way down, and so is swap file usage (basically, it’s not being used, and it was, before — a lot). Barring any future problems, I’m quite happy with this set-up, and would advise this change to anyone who’s never tried anything other than Apache on an Unix system. I’ll probably try doing the same thing on my home server, too.

For the Portuguese-speaking paranoids out there…

… go read this post of mine (including the comments).

You’ll never look at a blog that hasn’t had any new posts for a while the same way again. :)

Twitter

I know, I know, Twitter is last week’s news, so I’m late. Sue me. :)

Twitter is a system where you can tell, easily and quickly (for instance, by instant messaging, or cell phone), what you’re doing. You can also “follow” other users.

Anyway, I just joined. My username is “Dehumanizer”; feel free to add me (I like to convince myself that people are actually interested :)).

Twitter, at first glance, looks a little fun (it’s a new thing, after all), but completely useless, and even a bit self-masturbatory. However, looking at how other people use it, I’ve found that it’s not just for telling the world about useless stuff like “I’m going to the toilet”. People are using it as a mini-blog of sorts - with quick 1-2 line posts. Unlike a “normal” blog post, a Twitter post is so short that you can simply write something you’ve just thought or done, without interrupting your normal flow.

It’s also a way to, in a way, keep in touch with people, even if you don’t usually talk to each other, such as former co-workers.

Anyway, we’ll see if I keep using it or not. I probably will, but not “religiously”. :)

Blog moved

I finally had some time today to move Way of the Mind (note the new URL) to my Slicehost virtual server. The new WotM Forum is also up, using MyBB, instead of phpBB like my other two. So far, I’m liking it (MyBB) a lot, though it’s a bit weird to have the entire theme inside the MySQL database instead of normal .php or .css files. :)

Moving the WordPress blog was simply a question of following these instructions. Basically, you go to the WP options in the old blog, change the 2 URL fields to the new address, dump the database, do a search & replace to change any images and other URLs in the database to the new address, import the database to the new server, copy the files, and that’s the proverbial “it”.

As for redirection, there came the eternal dilemma: if you redirect everything, then people will be lazy and keep using the old address (thus wasting your bandwidth); if you don’t, it’s inconvenient, and you lose everything you had in terms of incoming links and SEO.

What I did was to redirect (301, to signify a permanent move) every URL except the front page, which shows a message telling people about the change, and redirects after 5 seconds. I believe that this is the best of both worlds. Any link to an individual post will be redirected transparently, but whoever arrives at the front page will told about the change of address, encouraging them to update their bookmarks.

AWStats fix for Portuguese search engines

If, like me, you use the current CVS version of AWStats, you may have found that, since they recently added Sapo to its list of known search engines, if your web site is located in Portugal (like mine are), your top search query is, suddenly, “Resumo“. Even if your site is in English. :shock:

“Resumo” is, in this context, Portuguese for “short version“, and it’s included by default in all Sapo queries. But why is this happening?

I’ve tracked it down to an AWStats bug, which I reported to the author, along with a patch. That patch, in addition to fixing that problem, also adds support for Clix queries. For more details, including the patch itself, please visit the SourceForge page for this bug.

5 HTML elements you probably never use (but perhaps should)

SEOmoz has a post called 5 HTML elements you probably never use (but perhaps should). I’ve learned a few things there, which is always a good thing. :) I’ve been doing web pages for years, and didn’t even know those tags existed… :|

The Portuguese and the Web

Most of this blog’s subscribers speak English, and I know how annoying it can be to have a post in your feed reader that you can’t understand. And this post of mine, from “A Arte de Blogar”, doesn’t really make sense for people outside Portugal… at least, I think so. But it should be relevant to the Portuguese readers (and they exist, indeed :)); therefore, here’s a link to it: Os Portugueses e a Web.

An excerpt, to whet your appetite (if you do speak Portuguese):

Por outras palavras, Portugal é como uma “selva inexplorada” em termos de SEO, e é facílimo ultrapassar os sites “a sério” em termos de posicionamento nos motores de busca (como disse, acontece frequentemente mesmo sem se tentar). Porque, por cá, ninguém sabe o que é SEO, ou como é que a Web funciona… e nem se quer saber.

Drupal 4.7

Yup, it’s out. A lot of interesting stuff, too.

My first community, which no longer exists, used Drupal, some years ago. It’s a pretty powerful system, with lots of options, tons of plugins and themes, sane defaults, and pretty easy to use.

I think I’ll play with the new version in the next couple of days… I don’t know whether I’ll actually use it for something, or just play with it. We’ll see.

Filtering "evil" popup ads with Squid

Sometimes, using AdBlock in Firefox may be too restrictive; by default, it blocks all ads, and you may just want to block the annoying ones: popups.
Firefox blocks them quite well, but it’s not perfect; some ad services have found ways to get around the blocker.

In this particular situation, I found that denying, in my Squid proxy server, the ad services which bypass the popup blocker, works very well.
This has the advantage of blocking them for a complete network, instead of just one PC, too. And it’s independent of browsers.

Popups are already annoying enough; to make them work around a popup blocker (which means that the user really doesn’t want to see them) is evil. So, the fact that these companies’ ads are blocked even before they get to the PCs is a nice bonus. :)

Here’s my current list, which I block using dstdomain in squid.conf:

.zedo.com
.paypopunder.com
.t2t2.com
.profredirect.com
.dellonlinedirectly.com
.farssearch.net
.searchs123.com
.freefa.net
.clicksor.com
.paypopup.com
.adserver.com
.yieldmanager.com
.fastclick.net
.tribalfusion.com

Whenever I see a popup ad, I just add its domain to the list. As you can see, it’s not huge - Firefox works quite well.
Enjoy. :)

EDIT: I’m not included popups which Firefox 1.5.x does block, or any other kind of ads. I can live with those - if not, I’d be using AdBlock.

EDIT 2: I’ll be updating this post whenever I find new ones. I’ve already added 2 domains since I wrote this post. :)

New social bookmarking / del.icious tutorial

When you work with IT and the Internet, it’s sometimes easy to forget that what is easy and obvious to us, may not be so for “regular” people. My recent feeds tutorial, for instance, was quite successful because of exactly that - because it didn’t assume that people already knew most of the stuff.

And so, I have just written a new tutorial, this time about social bookmarking, using del.icio.us as a practical example. Like the feeds one, this is probably not for you, now reading this blog, but it may be useful for showing to your less tech-inclined friends or family.

Without further ado…

I hope you enjoy it. :)

HTML, CSS and tables

In remote times, web designers used HTML <table>s for positioning text on pages, which these days is frowned upon by every single book or tutorial. The proper way is to use CSS for positioning, or any other kind of formatting.

However, many people, aparently, don’t really understand why using tables for formatting was “bad”; they only hear that “good designers use CSS instead”, and, therefore, seem to think that any use of the <table> tag is evil. I believe I’ve even seen a web tool which analysed pages, and complained about any <table> it found (I don’t remember what it was, though). Continue reading ‘HTML, CSS and tables’

The power of social bookmarking

Yesterday morning, I completed a new mini-site, Chess: basic principles. It’s a short, 1-page site with some principles for chess openings, intended for “advanced beginners”. As I usually do, I submitted it to several social bookmarking sites.

The results were amazing, much better than I ever got in the past. Digg mostly ignored it, and the Portuguese Digg clones (where the Portuguese version, Princípios básicos de Xadrez, was also submitted) are too small to make a difference. But several others…

Continue reading ‘The power of social bookmarking’




Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal
Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal