Arkiv för kategori » hosting «

Torsdag, March 26th, 2009 | Författare:

Have you previously realised that www is redundant? If so, I’m preaching to the converted and you can run along back to whatever you were busy with. 😉 Otherwise, stand to attention, soldier!

begin rantish text:

When I’m browsing the web, I’d much less prefer to”. Reason being that if *every* site has to have w’s, what’s the point of the w’s? Not to mention that they’re a bitch to pronounce. There’s 9 syllables in there! You could almost halve that by sayingtriple-w”. I’ve heard people saydub dub dub”. Bleh. Even the World Wide Web Consortium prefers to call themselvesW3C”.

So what exactly is (was?) the point of the www? There might be more to it, however the gist of it appears to be that when Tim Berners-Lee first created the hypertext document retrieval system, he called itWorld Wide Web”. I believe that www became a standard not because it made sense or because it was a good idea, but because it was hyped far beyond the healthy respect it deserved.

Your web browser *knows* you’re dealing with web content solely by the fact that there’s an http:// in front of the url. Therefore I submit, the www is redundant.

Need more convincing?

Search engines see and as 2 separate web sites. Because both sites have identical content, search engines might lower your Search Rankings. Hell, you’d be competing against yourself for rankings. Silly example: instead of 3rd, you might be 5th och 7th. For this reason, it is better to either force www or to force no www. I’m in favour of the latter.

If you browse to you will be redirected to Even if you go to the downloads directory of my main domain with a www, you’ll be redirected appropriately. Importantly, search engines will only find one copy of my web site, inte 2. And in the long run, I’ll be wearing out my w key a li’l less. 🙂

With the possible exception of a few quick deaths, no w’s were hurt during the production of this post.

Dela med sig
Onsdag, March 18th, 2009 | Författare:

[edit] So much for that. It turns out that openssl is able to determine that the key and certificate are already in a single file. Därför, ingen csplitting required (samt, I hope somebody reading this at least learned about how nice csplit is). In fact, the whole script might as well be obsoleteblaargh. Well, at least it gives a nice warning about not giving a blank passphrase. 😀

Here’s the new version:

pem2pfxconverts a .pem-formatted file containing a private key and signed certificate into a Windows-compatible .pfx certificate file.

#Tricky -
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
if [ $# = 1 ]; then
  outputfile=`echo $1 | men 's/.pem$/.pfx/'`
  echo "Please specify a password below. Windows refuses to import a .pfx certificate with a blank password."
  openssl pkcs12 -export -out $outputfile -in $1
  echo "pem2pfx - converts a .pem formatted private-key and certificate file to an IIS-compatible .pfx file."
  echo "Usage: pem2pfx inputfile.pem"


Dela med sig
Lördag, 21 februari, 2009 | Författare:

De relativt nya dokumenttyper Kontors 2007 har gett en del webbhotell problem när deras kunder vill erbjuda dokument för nedladdning. Oftast, dokumenten som erbjuds av webbservern som “text / html” som sedan återges som ett ton skräp på nätet användarens skärm.

Det bästa sättet att lösa detta är att lägga all MIME slag till serverns huvud konfiguration. IIS7 för Windows redan har dessa MIME-typer inställd som standard. IIS6 och IIS5 kräver MIME-typer som ska läggas, som kanske Apache på äldre installationer. För Apache, finns det också en lösning för den enskilde ägaren domänen för att lägga till MIME-typer via Apaches .htaccess fil.

IIS 6 MIME-typ tillägg (för Server Administrator)

Innan detta kan göras, se till att din server är också inställd på att tillåta direkt metabasen redigering:

  1. Belastning IIS-hanteraren: Start -> Run, “inetmgr” -> [OK]
  2. Högerklicka på “server” och klicka “Properties”
  3. Inom “Internet Information Services” flik (oftast den enda fliken), säkerställa att den “Enkunna Direkt Meta Redigera” kryssrutan är markerad.
  4. Klicka [OK]

Se till att Säkerhetskopiera IIS konfiguration (här för IIS5) förhand. Jag kommer inte att ta något ansvar för en admin bryta hans server. Jag har anledning att tro detta får också arbeta på IIS5 men jag har lika mycket anledning att tro att det bara kan ge massor av fel. Om en IIS5 / Windows 2000 admin är villig att testa detta för mig efter säkerhetskopieringen konfigurationen låt mig veta om resultaten.

Kopiera följande text i en fil med namnet msoff07-addmime.vbs och exekvera den en gång från kommandoraden genom att skriva cscript msoff07-addmime.vbs och trycka på Enter. Om du kör den mer än en gång, MIME-typerna kommer varje gång och du kommer att ha flera identiska poster:

"Detta skript lägger den nödvändiga Office 2007 MIME-typer till en IIS 6 Server.
"För att använda det här skriptet, dubbelklicka eller köra den från en kommandorad.
"Kör det här skriptet flera gånger resulterar i flera poster i
"IIS MimeMap så du bör inte köra det mer än en gång.
"Modifierad från
Ingen MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
"Ställ in MIME-typer som ska läggas
MimeTypesToAddArray = Array(".docm", "application/", _
".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application/", _
".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "application/", _
".potx", "application/vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "application/", _
".ppsm", "application/", _
".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "application/", _
".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", _
".sldm", "application/", _
".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application/", _
".xlsb", "application/", _
".xlsm", "application/", _
".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
".xltm", "application/", _
".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template") 
' Get the mimemap object
Set MimeMapObj = GetObject("IIS://LocalHost/MimeMap")
' Call AddMimeType for every pair of extension/MIME type
For counter = 0 till UBound(MimeTypesToAddArray) Steg 2
    AddMimeType MimeTypesToAddArray(counter), MimeTypesToAddArray(counter+1)
' Create a Shell object
Set WshShell = CreateObject("WScript.Shell")
' Stop and Start the IIS Service
Set oExec = WshShell.Exec("net stop w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Set oExec = WshShell.Exec("net start w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Set oExec = Nothing
' Report status to user
WScript.Echo "Microsoft Office 2007 Document MIME types have been registered."
' AddMimeType Sub
Sub AddMimeType (Ext, MType)
    ' Get the mappings from the MimeMap property.
    MimeMapArray = MimeMapObj.GetEx("MimeMap") 
    ' Add a new mapping.
    Jag = UBound(MimeMapArray) + 1
    Redim Preserve MimeMapArray(Jag)
    Set MimeMapArray(Jag) = CreateObject("MimeMap")
    MimeMapArray(Jag).Extension = Ext
    MimeMapArray(Jag).MimeType = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
End Sub

Apache MIME type addition (för Server Administrator)

Apache stores its MIME types in a file normally located at $installpath/conf/mime.types. See the mod_mime documentation for more on how it works. Arch Linux installs its MIME types at /etc/httpd/conf/mime.types och Parallels Plesk installs it in /usr/local/psa/admin/conf/mime.types. Your distribution might have it in another place, so find your mime.types file by running locate mime.types.

Add the following lines to your mime.types file:

application/                          docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document   docx
application/                          dotm
application/vnd.openxmlformats-officedocument.wordprocessingml.template   dotx
application/                    potm
application/vnd.openxmlformats-officedocument.presentationml.template     potx
application/                       ppam
application/                   ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow    ppsx
application/                pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/                       sldm
application/vnd.openxmlformats-officedocument.presentationml.slide        sldx
application/                            xlam
application/                     xlsb
application/                            xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet         xlsx
application/                         xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template      xltx

Apache MIME type addition (For the domain owner with at least FTP accessusing .htaccess file)

Add the following text to your domain’s .htaccess fil, most commonly in an httpdocs/ directory

AddType application/ docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/ dotm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/ potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/ ppam
AddType application/ ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/ pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/ sldm
AddType application/vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType application/ xlam
AddType application/ xlsb
AddType application/ xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/ xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
Dela med sig
Lördag, 21 februari, 2009 | Författare:

and my Personal Rating (PR) out of 10 😉

I use firefox so most of these won’t apply to non-FF users. Men, I’d be very very interested to hear what other addons my friends, subscribers, and random websurfers find interesting or useful to them. Have your say and let us know why you love the addons you love. 🙂

Själv, I prefer addons that aren’t intrusive. Ideally, an addon must have a minimal interface and give me a measurable benefit for me to keep it installed.

Cacheviewer – 7

This is a GUI front-end for the Cache Firefox keeps of the last few pages and media. I’ve found this addon more interesting than useful right now so I’m probably going to remove it soon.

ColorfulTabs – 9

I love the colours. The tab colour-grouping doesn’t work very well when you reach about 30 tabs though… :-/

Download Statusbar – 10

I prefer having everything in Firefox in a single window in tabs. Having a download box in a separate window is a big no-no for me. It also saves screen real-estate since it is very minimal. 🙂

video DownloadHelper – 10

Video DownloadHelper ser för strömmande media – specifikt letar efter någon stor innehåll som laddas ner. När du klickar på ikonen, Det hjälper dig hitta de tillfället nedladdning strömmar och ger dig möjlighet att köa det som en “vanligt” nedladdning.

Eftersom du vet aldrig om FF kommer att krascha eller strömmen kommer att minska, Jag föredrar att spara en kopia på mitt skrivbord och jag kan sedan titta på videon utan att använda mer bandbredd för att ladda ner video igen. Också, på jobbet, när folk skicka mig länkar till youtube eller andra medier, Jag brukar inte bry titta till mycket efter – på min egen fritid eller under en paus.

Expiry Canary – 9

Denna snyggt och minimal addon berättar om SSL-certifikat för webbplatsen du visar snart kommer att löpa ut. Om din egen webbplats har ett SSL-certifikat, Jag rekommenderar att du använder denna addon för att undvika webbplatsens SSL-certifikat löper ut på grund av en enkel brist på anmälan eller missförstånd.

Fasterfox – 8

Fasterfox adds some network optmisation options. Some of the options could make your corporate network admin a little mad with you though. 😉

Pyroman – 9

För webbutveckling och experimenterande med sidor. Häftigt för att testa små bitar av kod samt felsökning sidor.

FoxClocks – 6

errtells you the time in other time zones. o.O Was useful for a short timenow its redundant since my head is working it out faster than I can glance. rm -f

FoxyProxy – 9

Häftigt för att bläddra specifika sidor genom särskilda proxyservrar. This is useful for when some sites are blocked or the SAIX Transparent Proxy servers aren’t working properly. 🙂

Jag använder detta för att dirigera en del trafik över proxyservrar som jag inte vill gå igenom standardvägar. Its also very flexible. Om du har mer än en proxyserver som finns och du använder oftast plötsligt går på blinka, bara växla över till nästa. 🙂

Mekaniker – 10

Right now, I use this only for the GooglemonkeyR script. This script reformats Google‘s search results to your specifications and also has an option to show small thumbnail of the pages Google links to. Greasemonkey can do a lot more and there are plenty of scripts readily available for many many sites.

Live HTTP headers – 8

I’ve used this a few times to diagnose gzip compression issues with IIS web servers. Not much else to say though: It works.

Live PageRank – 10 (so faronly installed it yesterday)

This addon seems simple enough. It gets the PageRank from Google and shows it in the tray.

NoScript – 10

NoScript är toppen på blockerande annonser. Dess lite irriterande först eftersom man måste vitlista alla webbplatser som du gillar – but in the long run it is soooo worth it. 🙂

återuppliva Sidor – 10

Mycket användbart för om du bläddra till en plats och det råkar vara nere. Om webbplatsen är statisk innehållsorienterad då detta gör det enkelt att snabbt hitta det innehåll om dess cachad på nätet.

Tab Mix Plus – 8

Awesome for if you have more than 7-or-so tabs.

ShowIP (using a version modified for work purposesdisplays company server’s canonical name when browsing) – 10

I cannot imagine the hell I’d have to go through to identify a server without this plugin. Okay, I can. Used to have to do this all the time. I eventually scripted it but I can’t find the original script. Here’s my 60-second attempt at recreating what was in that script:

$ cat /etc/hosts | grep `dig A $hostname @mycachingnameserver | grep . | grep -v "^;"`
$ dig -x `dig A $hostname @mycachingnameserver | grep ^$hostname | grep A | \
  awk '/[.]/{print $5}'` @mycachingnameserver | grep . | grep -v "^;"

Web Developer – 9

I used this once to diagnose some issues with a page. I don’t do much web development so I’m going to remove this one. Its no comment on its capabilities since I believe this is a top notch add-on if you’re doing a lot of web development work.

Dela med sig
Tuesday, February 17th, 2009 | Författare:

Some of you may already know that I built a home server not too long ago. I documented some of the very important parts of how it was built though I was planning on releasing all the documentation all at once. I was using Arch Linux and I hadn’t nearly finished everything, especially the documentation. Till exempel, it was supposed to be a media server. After some disk shuffling, it was supposed to end up having a RAID1 for the boot and RAID 10 for the rest (the media part).

This didn’t work out at all.

I got as far as having an efficient (och samtfirewalled) routing gateway server. I was finally satisfied that the customised local routing* was working correctly and I was confident that my tests with DHCP meant I could disable the DHCP service on the flimsy ADSL router and have all my flatmates start using the server as the Internet gateway. Instead: I was logged in to the server from the office, I’d just installed Apache2**, and I was about to consult with a colleague regarding getting nice graphs put together so the flatmates could all see who was using up the bandwidth***when I noticed a little message indicating that the root filesystem had been remounted read-only due to some or other disk failure.

And then I lost my connection to the server.

And then I gained a foul mood.


When I arrived home, I found that, as I had guessed from the descriptive message given at the office, the (mycket) old 80GB IDE disk that I was using for the root filesystem had failed. Unfortunately, the server would never boot again and there was little chance of prying everything off onto another disk to continue where I’d left off.

I’m buying a replacement (SATA) HDD this next weekend just after pay dayand I’ve changed my mind about documenting my progressand backing up my configurations:

Release Early. Release Often.

* ISPs in South Africa charge less (easy price comparison) forlocal-only” (within South Africa) traffic on ADSL but only if you use an ADSL account that CANNOT access web services outside of South Africa. This means that if you want to take advantage of the reduced costs but still be able to access the Internet at large, you need to set up some sneaky routing.

** one-command-install: ~$ yaourt -S apache

*** Internet Access in SA is expensiveyou get charged about R70 ($7 / £4.9 / €5.46) per GB when using ADSL, or about R2 per MB if using GPRS / 3G.

Dela med sig