Webserver Setup, Redressed

I thought I might take a moment to talk about my web hosting setup.

I run a decent amount of websites (roughly 12 or so) and some of them quite popular. Popular enough that, long ago, I’d outgrown shared or VPS hosting packages. I tried dedicated for a bit, which was nice but expensive. So, in the end, I built a kick ass server and sent it off for colocation. There’s nothing like knowing the machine you built and getting the best in prices.

However, one of the great perks about shared/vps type hosting is that they come with all the “extras” already hooked up for you —  web server installed and setup, databases ready to go, and an email server prepared. I can not emphasize how under appreciated that last item on the list is. After 3 years of self hosting, I can say that, without a doubt in my mind, email services are the toughest part of running a web setup.

Email is not only complex from a theoretical point (understanding MTX’s, routing, user/virtual local/remote delivery, and more) but also very difficult to setup — relying on a large number of interdependent packages that (in my experience) aren’t very easy to get tied together. (Take this with a grain of salt as I am not a trained Linux Master, but I’ve got enough experience to compile a webserver, php, and mysql in a morning where as getting a mailserver up takes me a day with precompiled code and a tutorial.)

However, you still have to be able to provide email for the websites you host so I had two options:

  1. Take all my email and do a simple ‘dump’ off to some other service like GMail.
  2. Figure it out.

I’m too much of a control freak (somewhat a part of deciding to self-host), so I went with 2. However, I didn’t want to break my primary hosting machine with all this mail server gunk. Plus, my main server has a habit of needing down time or location shifts and I did not want to deal with server backups directly.

To solve these problems, I spend 20$ a month on a VPS slice from SliceHost. Amazing service, fast, great control panel, automatic complete system backups, and overall a 100% awesome experience. I use this slice for specificaly hosting my email (and Trac/SVN) services. All of my domains point to this machine to deal with email. I had managed to cobble this together with Ubuntu 6.06 last year to take any mail (for any domain!) and save it for a single user — it took me nearly 3 days to get that working right.

Obviously, that solution is somewhat lame: What if I want other users? What if one domain needs mail to go else where? I couldn’t address any of these options really.

In addition to these dilemmas, the Ubunut 6 was rocking Trac0.9 and python2.4 — ew. Time to upgrade.

5 minutes later (that’s how long it takes Slicehost to completely reimage your VPS for a completely bare OS install — wow) I was up and rocking Ubuntu 8 and its shinny, new repositories.

Using two tutorials, Complete Mailserver Setup in Ubuntu 8.04 and Trac on Hardy Heron, I’ve got the machine now setup to server as a Trac/Subversion hosting machine as well as a mailserver capable of gracefully handling mail for multiple domains and users as defined by a pleasant-to-work-with mysql database.

With the Trac/SVN/Email server and the larger Web/Database server setup, I’ve not got a complete, fully self-hosted solution and I’m ecstatic about having all the pieces tied together.

Wordpress and MySQLi Only Installs

I have long since ditched MySQL 4, and about a year ago I stopped installing the plain MySQL libraries with PHP. (Mostly, they are a pain to install when you are custom building MySQL 5 and PHP 5 on 64 bit architecture, but I digress…)

However, not having access to the plain mysql_* functions makes Wordpress very sad. In WP2.3 there was a work around that was pretty painful, involving some core editing. However, between then and WP2.5, the meek sobbing of folk like myself have been heard!

Simply download this updated db.php and place it in at wp-content/db.php.

You’re done. No really. That’s it! From what I can tell this should even work for fresh installs, not just current installs. If you find anything broken with it, let me know and I’ll give it an update.

Update! I’ve updated to work with Wordpress 2.8.4. You can get the new db.php file here: http://jrm.cc/extras/wp-mysqli-2.8-db.txt

Awesome

I was doing my regularly schedule Vanity Search and this came up:

Made. My. Day. :D :D :D

Intuitive Image Zoom Technique

Kim was browsing the Banana Republic site looking at buttons on jackets ( her’s keep falling out :( ) and she showed me this neat rollover zoom image feature:


Regular


Mouse Over’ed

This is a very neat effect — simple, useful, intuitive, and easy to degrade (click would enlarge). Love it! I plan on keeping this little gem in my back pocket. :)

Color Palette Generator Upgrade

I took a few hours today to review some of my old code and update it. The Color Palette Generator is an old project of mine — probably 3 years old now — which takes images and, as it says on the tin, creates a color palette from it.

The algorithm introduced originally was fairly simple:

In this method, you would choose a “grid” (in the above, 3×3). The image would have 9 lines drawn through it and where those lines meet, the color of the underlying pixel would be used as the “palette”. While this wasn’t “wrong”, it wasn’t perfect. Many times the pixel under it would not be incorrect, per se, but it wasn’t very accurate.

Since writing the code, a few other methods have surfaced, one of my favorite, however, is the resize-and-sample. This process is very straight forward, and tends to deliver reliable results despite appearing to “wash out” some of the more vibrant portions of the image.

In this method, the image is resized down to the grid size (so, 3px by 3px) and the resizing causes a “blurring” of the image and all the colors get averaged down to 9 total pixels. These remaining pixels are now the average colors of the image.

Both methods are valid, and sometimes one is better than the other, however now they are both available. Pick a favorite and enjoy :)

Additionally, the updated source code is now freely available for download. Please note! I will not provide support for this code.

A Walk and A Museum

Me and Kim went to visit the Tekniska Museet (National Technical Museum) which happens to be a short walk from our apartment. (Like, really short — just across a huge park down the street).

Anyway, some photos!


Kim in the park


I head the top of this tower is a restaurant


The place had a really cool light up “Where is something” navigation piece


Another label, this time on a turbine


A Steam Engine Plate


Driver in the back, two passengers in the front

New Plant Tires Kitties

I got a new plant — cats got new plant. :|


Lucy goes for the kill


Lucy nom noms …


… and naps


Sam sat it out till later, when he found a way to SIT in the plant :(

Cat REI Here We Come


I know that look little boy…

Thus follows the destruction of drapes — and the rod holding them up.

Seems like I could use a jungle climbing gym thing…

DHelL

Quick Summary

A 30” Samsung 305t ($1,300 monitor) left San Francisco in brand new condition and packaging in September, 2007. For the next week it was solely in DHL’s care and custody. When the package arrived on my doorstep, there was no monitor in the box and it had been retaped with DHL branded yellow tape. Any intelligent person would deduce from the perfect condition of the interior items, the fruitless search for a “misplaced” monitor, and the retaped package that someone within DHL stole my property — and I want my money back.

Resealed box

Some Back Story

In September 2007, I moved to Sweden. As part of the move, my new company here allowed me to use their corporate account to quickly ship across my computer components. My girlfriend, Kim, lives with me in Sweden and was home most days at the time.

“The Second Shipment”

I sent two shipments to myself. Heather, my good friend of 5 years running and roommate from SF for many of those, was my local SF help. I had already left for Stockholm (complicated last days schedule) so she stepped in to handle the final shipments. The first shipment arrives without issue. The second shipment consisted of three boxes:

  1. My computer
  2. A new 30” Samsung 305t monitor
  3. A box of misc. computer components

Boxes #1 and #3 were perfectly fine. A little worse for wear, but I expected nothing less from a trip around the world. Box #2, however, was a different story. When the shipment arrived, Kim was the one home to accept it. Not knowing exactly what was coming, she had no idea what to expect and what not to expect. So when she pulled the boxes inside she didn’t note anything was wrong…

When I returned home that evening, I was elated. The monitor which I had bought in the US but hadn’t gotten to try was here and I was excited. I put my belongings down and went to haul the monitor out to the living room to get it setup when, to my surprise, it lifted with almost no effort. A bit shocked at having heaved a mighty ho only to find the box sprung up into my hands like a coiled snake did the realization that something was horribly wrong hit me.

The Discovery

After toting the far-too-light box to the living room, I was filled with dread; there could be only one reason this was so light and I didn’t want to believe it. I was holding out in the hopes that I was wrong. I thought, “Perhaps when they said 25lbs, they meant …. I dunno!”

I opened the package from the top edge — cutting across the packing slip seal. Upon opening the case, I found the following:

Resealed box

  1. Two undamaged halves of box filling styrofoam
  2. Power cable
  3. Registration card and install cd
  4. DVI cable
  5. A blanket

The blanket was a present packed into the box before it left San Francisco. Heather put it in there for me. She also very securely retaped the box afterwards knowing what precious cargo it carried.

The odd thing about this dilemma, however, was that the styrofoam pieces were packed correctly — it was as if the monitor had simply vanished from the box. Then the worst fear of all arose. I put everything inside the box aside and flipped it over. The box had been copiously resealed with DHL branded packing tape. Almost as if someone had opened it, carefully removed the monitor, replaced the contents correctly, and resealed the whole thing. I was livid with anger. I trusted this company with my precious commodities, my beloved belongings, my valuable assets and they (or one of its responsible agents) had opened my box, removed a $1,300 monitor, packed it back up, and sent it on its way.

Taking Up The Cause

I couldn’t seem to make contact with the DHL claims department over email, so Heather offered to start the process on her end in the U.S. After a few calls, she was hooked up with a guy we only know as Steve. Steve started processing the search for my, as he put it, “lost” monitor. I understood he had to do his thing, but knew without a shadow of a doubt that his search would uncover absolutely nothing. I was correct. I took over the badgering of Steve for progress updates soon after the initial contact. His constant explanation was something like this:

Well, sometimes when packages move through the conveyors, they may split open and the contents fall out. When that happens, an agent will put it all back as best they can and tape it up to continue shipping along. – Steve

This kind of scenario I could, perhaps, believe if a box with lots of small items burst open and a few got shuffled away. But, here, this is positively a load of bull crap. How does a HUGE 30” monitor “fall out” of a box without damaging the styrofoam and not get put back in? Or even more to the point, how did none of the other small, easily lost, loose-packed items (cords, manuals, etc) not also fall out and get lost?

At this point, the claims process started…

Where It Stands

DHL has put me through 2 stages of their “collection deflection” process now. First, they held me up for 35 days, claiming that they’ve been backlogged (with your company constantly stealing property, that’s not big surprise) and eventually sent me a settlement for $727.11 — about half of the monitor’s value. Their rationale was that I hadn’t insured the package, so they would not cover the cost of the monitor but only a predetermined about based on its weight.

As that settlement was unacceptable to me, I expressed my discontent with it and sent a formal letter in which put my case back in the “collection deflection” queue. Almost 20 days later, today, I received their response: Essentially, they reprinted their first letter and had a new person sign it. They’ve refused to pay me back for stealing my property.

My Rationale

I understand there are inherent dangers in shipping goods. Moving a package halfway around the world can be difficult. Inevitably, the contents of some packages will break or entire packages can go missing. I accept these facts and, had one of those been the case, would be willing to concede on the settlement amount proposed due to the lack of purchased insurance.

Theft, however, is not a risk one should account for, nor accept, when the thief is in the employ of the company itself. To be expected to pay for the protection of my goods against theft by the company I’m shipping with is tantamount to running a protection racquet on the goods DHL ships. As if to say, in your best gangster slang, “Well your stuff might make it there, but every once in a while packages get opened and looted en-route, so you should pay us double to ‘protect’ your items.

Next Steps?

This is why I’m posting this publicly. I’ve been a nice boy and run through their process now. I’ve jumped their hoops and barked when they clapped to try and do this right. I’ve been polite (firm, but polite) and never once lashed out at the people trying to make this happen.

However, I’m stuck. Apparently the second time around is the last time they will review a claim with their customers and the decision is “final” in their eyes. So, after playing the game by their rules, I’m looking to see how else I can attack this problem.

If you have any suggestions, I would really appreciate it. Perhaps you know someone who has fought for a claim with DHL and gotten it. Perhaps you know some people there I can contact about this. Perhaps you can help me push this publicly to make it cost them more than a simple $1,300 check would hurt them.

Thanks, and wish me luck.

Holiday Alone

Since Kim’s been gone, I’ve spent the last week by myself here with the cats. Dropped in at work a bit (no point in taking mid-season days off if I don’t need ‘em), done some shopping and cleaning, and LOTS of programming. Oh man. Can’t get into what I’ve been working on yet, but it’s pretty awesome.

My “presents” box got here from my dad the day after christmas. Outside of some personally wonderful gifts from Kimmy and a package still at my moms, this is it for my xmas gifts this year.

It’s a car box filled with lots’o‘goodies my dad thought I’d be missing here, along with some power cords I requested (can’t get power to the bedroom, etc, from the one massive unit adapter I have in the living room.)

Two other random images I grabbed while being around the house…


:D hehehe


It was a stunning morning one the 26th

Taiwanese Recycling Symbol

This is an awesome logo. At first glance it makes a bit of sense. If you look at the white space (like the FedEx logo) it becomes even more compelling. Very nice.

What Valve Is Peeping With Their Hardware Survey


Miscellaneous:
    UI Language:  English
    Microphone:  Yes, I have a microphone.
    Media Type:  DVD
    Total Hard Disk Space Available:  618141 Mb
    Largest Free Hard Disk Block:  224799 Mb
    OS Install Date: Aug 05 2007
    Installed Packages: <strong>Firefox,OpenOffice</strong>

I find that interesting. I wonder what else they scan for. More so, I can’t decide if I should press the submit results button or not. Hrm.

True Christmas Meaning

Give it a moment to sink in.

Ooooo, pretty

As is obvious if you’ve poked around my site a bit, you’d be aware that I like guns. I own a rifle of my own and (used to :() regularly shoot.

My preference is for rifles. I don’t like the kick to my wrist/arm that pistols deliver. Additionally, if I had to use a weapon, I’d rather be 50-300m from the danger.

I’d even more so prefer to be 1-2000 meters away…


b.f.g

And it’s legal in California, if that’s where I end up back at.

Cat Portraits

I spent some time chasing Sam and Lucy around with a camera getting photos of them. A few came out really nicely.


“Let’s go do something … some exploring!”


“What be over yonder?”


“Its a monster!”


OMGNOWAI!”


“Oh, it’s just you!”


“Tee hehehehe”

Yes, the narrative is awesome. I know.

 

JM

  1. Posts
  2. Images
  3. Status
  4. Videos
  5. Audio
  6. Links
  7. About
  8. Contact