Nginx

Must play with this HTTP server/load-balancer/mail proxy/bundle of awe­some some­time soon. Looks like a pretty awe­some option for VPS envi­ron­ments and other places where there isn’t heaps of spare resources going around! My cupboard-bound SSH oasis and occa­sional web­server is, of course, a likely can­di­date… but I’m a tad con­cerned I’ll screw myself over with PHP. Not because it par­tic­u­larly gets used for that (there’s like… a few wikis and a hand­ful of lines of PHP code eas­ily replaced by some­thing else that get semi-regular atten­tion) but mostly for the “just in case” I wanna test run some­thing. And yeah, I know, that’s what vir­tu­alised stuff should be for… but I still haven’t quite caught up to that. I’ve got an Ubuntu thing run­ning in a vir­tual PC instance on the com­puter I use most of the time, but it just doesn’t cut it for actu­ally try­ing to test some­thing out with, you know, other users and real Inter­net con­nec­tiv­ity. In other news, can-we-have-IPv6-moar-plx? Just because it’s absurd to have to pay more to run real SSL on ded­i­cated IPs when there is SO MUCH SPACE just wait­ing for us to broaden our hori­zons and start to fill it. I’m not heaps fussed if pre-Windows XP users can’t use it, actu­ally, because they’ve likely got big­ger secu­rity prob­lems on their hands from their network-connected 10-year-old OS than any reg­u­lar web inter­ac­tion is likely to give them, prop­erly secured or not — that is, even if their web traf­fic is secured, their desk­top is prob­a­bly a bot­net zom­bie with key­log­gers and tro­jans abounding.

Subclipse Proxy problems

Finally, Subversion’s PROPFIND is enabled on the proxy server at one place I work, but for some rea­son Sub­clipse was still being a lit­tle bit special.

Turns out it doesn’t use Eclipse’s HTTP Proxy set­tings, but needs set­ting elsewhere.

On Win­dows XP, this will be in your Appli­ca­tion Data path under Sub­ver­sion. Mine is as follows:

C:\Documents and Settings\joshs\Application Data\Subversion

I haven’t got a Vista machine to test on, but it will still be the Appli­ca­tion Data\Subversion folder within the user’s path. (I will con­firm this next time I’m on a Vista box.)

Linux users, look in ~/.subversion/

Open the file “servers” (no exten­sion) and scroll to the bot­tom sec­tion, [Global].

Un-comment and edit the http-proxy-host and http-proxy-port set­tings (and user/password if required, it wasn’t for me) as appro­pri­ate and every­thing will start work­ing. You don’t even need to reload Eclipse.

Pro­duc­tiv­ity just soared!

3GB/month broken

Well, turns out last month’s HTTP band­width usage wound up at around 3.75GB. Cool­ness. It recently occurred to me that I don’t par­tic­u­larly have any “Slashdot-me” ambi­tions for this blog at present, but it’s still fun watch­ing the num­bers increase every month for no appar­ent rea­son! Except, per­haps, ‘the plebs’ catch­ing up with my occa­sional open-source trendi­ness ;-) Or some­thing… prob­a­bly more of the ‘some­thing’. Heh.

120,000 hits and nearly 7,500 unique vis­i­tors to this site last month were served 56,000 pages by Dale’s metro FreeBSD server… heh, from one of the most serious-looking home server setups I know of. Still, ‘consumer-grade’ though it may be, it’s doing rather well! Tech­nol­ogy is fun ;-)

# by Josh on April 1st, 2006 Tags: ,
| No Comments »

The Single IE Linebreak Through [optionally transparent] Proxy Character Encoding Bug

It’s new, so far as I’m aware, and I can’t even build a decent test case for it. In one instance alone, if there’s a blank line between two ele­ments (i.e. just for read­abil­ity, doesn’t need to be like that), then cer­tain ver­sions of IE — and only when their traf­fic is being prox­ied through cer­tain transparent/non-transparent servers — will dis­play a blanking/“unknown” character.

At first it was thought this was just because of a dud char­ac­ter in a file, but then we tried using PHP to echo \n\r, \n, and \r in the place of a man­u­ally entered return: all of which resulted in the bug per­sist­ing. The only fix I’ve got is to use an HTML com­ment between lines

</element><!--
--><another element='element'>

Like that. Any­thing else, and we get a blank­ing char­ac­ter in there. Bizarre!

It doesn’t occur any­where else on the site in ques­tion, and I’m not going to waste hours try­ing to build another un-branded test case which may or may not work! The prob­lem affects IE only (though we didn’t do ver­sion test­ing), and only when traf­fic is going through (some) proxy servers. And only that one character.

It’s not an encod­ing prob­lem per-se, though is obvi­ously related to that in some sense. This is still internal-only, and it’s not being dished up with proper content-types defined in HTTP head­ers (because I’m still liable to change my mind as to how that should be done, and I’m not call­ing it until the site is about to launch/what is/isn’t required in terms of content-type – affected things is abun­dantly clear!), but see­ing as it only has an impact when using through a proxy it’s pretty obvi­ous it’s not JUST here. Shrug. I reluc­tantly deleted the line­break and the box went away.

# by Josh on January 24th, 2006 Tags: , ,
| No Comments »

VirtualHost, mod_proxy, and Apache HTTP 2.0 documentation

I had to setup a vir­tual host that prox­ied through to another server today, and found the Apache 2.0 doc­u­men­ta­tion on that mat­ter par­tic­u­larly unhelp­ful for a rather triv­ial reason.

Here’s their bro­ken version:

<VirtualHost *:*>
ProxyPreserveHost On
ProxyPass / http://192.168.111.2
ProxyPassReverse / http://192.168.111.2/
ServerName hostname.example.com
</VirtualHost>

Here’s my work­ing version:

<VirtualHost *:*>
ProxyPreserveHost On
ProxyPass / http://192.168.111.2/
ProxyPassReverse / http://192.168.111.2/
ServerName hostname.example.com
</VirtualHost>

Spot the difference.

Yes, it was as sim­ple as an omit­ted trail­ing slash.

Only takes a minute or two to fig­ure out what’s going wrong, but it’s pretty darn annoy­ing for that minute: I assume, as would many peo­ple, that doc­u­men­ta­tion is gen­er­ally infal­li­ble — its pur­pose being the cure to var­i­ous soft­ware ail­ments, not the cause! Ah well. I’d have edited the Apache doc­u­men­ta­tion, but it’s not a wiki and I can’t be both­ered join­ing what­ever mail­ing list I’d have to join to get one char­ac­ter added to their site!

# by Josh on January 2nd, 2006 Tags: ,
| 2 Comments »

Posting from BloGTK 1.1

Just for kicks, to see if it’s any eas­ier than using a plain old web browser to inter­face with the blog!

Any­way, BloGTK is a desk­top client for Word­Press which runs on Linux sys­tems. Nig­gly fea­tures I’ve dis­cov­ered in the last 30 seconds:

  • Can’t select text, then click the “hyper­link” icon, and have the anchor tags wrap around selected text — they appear to the right of it.
  • Com­pul­sory “tar­get” field in anchor gen­er­a­tion — which I don’t think (if I recall cor­rectly) is even valid in XHTML 1.1, pos­si­bly earlier.
  • Lack of built-in quick tags that Word­Press’ own post­ing inter­face has, namely for unordered lists, list items, and tag­ging of abbre­vi­a­tions, etc.
  • Iron­i­cally, it’s pos­si­ble to define your own tags, which can wrap around selected text just fine, whilst the “built-in” anchor but­ton doesn’t do this… Hmm, okay.

It’s really lit­tle things, noth­ing major — the for­mat­ting tags (strong, em, etc.) work just fine on selec­tions, which is great. It also has an inbuilt pre­view which (I’m 99% sure) func­tions using an inter­nal ren­der­ing engine (or part of the GTK toolkit, same thing), rather than mak­ing HTTP calls. A change that’d be inter­est­ing to see (although one which doesn’t affect me directly) would be the imple­men­ta­tion of either a WYSIWYG edi­tor, or sim­ply Tex­tile or Mark­down sup­port with XML­HttpRe­quest being used (or some­thing like it? I gather that’s a JavaScript thing, not hav­ing ever used it, so it mayn’t be usable like that.

Another thing that’d be nice is the imple­men­ta­tion of key­board short­cuts, just for text for­mat­ting stuff — so, Ctrl + B for strong and em tags, etc. And also the chang­ing of the cat­e­gory dis­play to a list of check­boxes in its own frame (or what­ever the term is in desk­top app inter­face design lingo) on the right of the post­ing area, instead of a drop­down — that’d allow posters to select mul­ti­ple cat­e­gories, more rapidly.

It’s a good sim­ple app (sorry… I know it’s prob­a­bly rather unsim­ple when you look at the code dri­ving behind it, but I don’t under­stand any of that Python stuff, so I’m just judg­ing on the inter­face), but a few nig­gly things mean I’d still pre­fer to use the native Word­Press web interface.

Edit: In part to see if it does, but also because I had another thought — the absence of a “Post­ing…” sta­tus win­dow is also some­thing which could be improved, just so the user doesn’t think the appli­ca­tion has crashed. It took a while here due to my ISP’s poor DNS per­for­mance, and had I not known why it was going slowly, I may have closed the appli­ca­tion think­ing it had crashed.