Archive for the Category » hosting «

Thursday, March 26th, 2009 | Author:

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 typewww.xkcd.comthanxkcd.com”. 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? Der kan være mere i det, men kernen i det synes at være, at når Tim Berners-Lee først skabte hypertekst dokument søgesystem, han kaldte det “Internettet”. Jeg tror, ​​at www blev en standard ikke fordi det gav mening, eller fordi det var en god idé, men fordi det var hyped langt ud over sund respekt det fortjente.

Din webbrowser * ved * du beskæftiger sig med web-indhold alene ved det faktum, at der er en http:// foran url. Derfor sender jeg, www er overflødig.

Brug for mere overbevisende?

Søgemaskiner se www.dogma.swiftspirit.co.za og dogma.swiftspirit.co.za som 2 separate hjemmesider. Fordi begge steder har identisk indhold, søgemaskiner kan sænke din søgning Rankings. Helvede, du ville være konkurrere mod dig selv for placeringer. Silly eksempel: i stedet for 3., du måske være 5th og 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 http://www.dogma.swiftspirit.co.za/ you will be redirected to http://dogma.swiftspirit.co.za/. 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, ikke 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.

Del
Wednesday, March 18th, 2009 | Author:

[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. Therefore, no csplitting required (godt, 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.

#!/bin/bash
#pem2pfx
#v0.2
#Tricky - brendan@swiftspirit.co.za
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
 
if [ $# = 1 ]; derefter
  outputfile=`echo $1 | sed '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 -i $1
 
 else
  echo "pem2pfx - konverterer en .pem formateret private nøgle og certifikat-fil til en IIS-kompatibel .pfx fil."
  echo "Usage: pem2pfx inputfile.pem"
være

mere…

Del
Lørdag, Februar 21, 2009 | Author:

De relativt nye dokumenttyper Kontor 2007 har givet Nogle værter problemer, når deres kunder ønsker at tilbyde dokumenter til download. Oftest, dokumenterne bliver tilbudt af webserveren som “text / html” som derefter gengives som et ton af skrald på nettet brugerens skærm.

Den bedste måde at løse dette er at tilføje alle de MIME typer til serveren vigtigste konfiguration. IIS7 til Windows har allerede disse MIME-typer konfigureret rigtigt som standard. IIS6 og IIS5 kræver de MIME-typer, der skal tilføjes, Som det kunne Apache på ældre anlæg. For Apache, er der også en løsning for den enkelte domæne ejeren til at tilføje MIME-typer via Apaches .htaccess fil.

IIS 6 MIME-type tilføjelse (for serveradministratoren)

Før dette kan gøres, sikre, at din server også er indstillet til at tillade direkte metabasen redigering:

  1. Load IIS Manager: Start -> Run, “inetmgr” -> [OK]
  2. Højreklik på “server” og klik “Prdriftsaktiver”
  3. Inden for “Internet Information Services” fane (normalt kun fanen), sikre, at “Ognstand Direct metabase Edit” afkrydsningsfeltet er markeret.
  4. Klik [OK]

Vær sikker på at back up IIS konfiguration (her for IIS5) forhånd. Jeg vil ikke tage noget ansvar for en admin bryde sin server. Jeg har grund til at tro dette kan også arbejde på IIS5 men jeg har lige så meget grund til at tro, at det bare kan give masser af fejl. Hvis et IIS5 / Windows 2000 admin er villig til at teste dette for mig efter sikkerhedskopiering konfigurationen, så lad mig vide om resultaterne.

Kopier følgende tekst i en fil med navnet msoff07-addmime.vbs og udføre den gang fra kommandolinjen ved at skrive cscript msoff07-addmime.vbs og trykke på Enter. Hvis du kører det mere end én gang, de MIME-typer vil blive tilføjet hver gang, og du vil få flere identiske poster:

»Dette script tilføjer den nødvendige Office 2007 MIME-typer til en IIS 6 Server.
"For at bruge dette script, blot dobbeltklikke på eller udføre det fra en kommandolinje.
»Kørsel dette script flere gange resulterer i flere poster i
»IIS MimeMap, så du ikke skal køre det mere end én gang.
»Modificeret fra http://msdn.microsoft.com/en-us/library/ms752346.aspx
 
Ingen MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
Const ADS_PROPERTY_UPDATE = 2 
 
'Sæt de MIME-typer, der skal tilføjes
MimeTypesToAddArray = Array(".docm", "application / vnd.ms-word.document.macroEnabled.12", _
".docx", "Ansøgning / vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application / vnd.ms-word.template.macroEnabled.12", _
".dotx", "Ansøgning / vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "Application / vnd.ms-powerpoint.template.macroEnabled.12", _
".potx", "Ansøgning / vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "Ansøgning / vnd.ms-powerpoint.addin.macroEnabled.12", _
".ppsm", "Application / vnd.ms-powerpoint.slideshow.macroEnabled.12", _
".ppsx", "Ansøgning / vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "Application / vnd.ms-powerpoint.presentation.macroEnabled.12", _
".pptx", "Application / vnd.openxmlformats-officedocument.presentationml.presentation", _
"SLDM", "Application / vnd.ms-powerpoint.slide.macroEnabled.12", _
"Sldx", "Ansøgning / vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application / vnd.ms-excel.addin.macroEnabled.12", _
"Xlsb", "application / vnd.ms-excel.sheet.binary.macroEnabled.12", _
"Xlsm", "application / vnd.ms-excel.sheet.macroEnabled.12", _
".xlsx", "Application / vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
"Xltm", "application / vnd.ms-excel.template.macroEnabled.12", _
"Xltx", "Ansøgning / vnd.openxmlformats-officedocument.spreadsheetml.template") 
 
»Få mimemap objekt
Sæt MimeMapObj = GetObject("IIS://Localhost / MimeMap")
 
»Ring AddMimeType for hvert par af udvidelse / MIME-typen
For skranke = 0 til Bound(MimeTypesToAddArray) Trin 2
    AddMimeType MimeTypesToAddArray(skranke), MimeTypesToAddArray(skranke+1)
Næste
 
'Opret en Shell objekt
Sæt WshShell = CreateObject("WScript.Shell")
 
"Stop og Start IIS service
Sæt oExec = WshShell.Exec("Net stop w3svc")
Af Mens oExec.Status = 0
    WScript.Sleep 100
Loop
 
Sæt oExec = WshShell.Exec("Net start w3svc")
Af Mens oExec.Status = 0
    WScript.Sleep 100
Loop
 
Sæt oExec = Intet
 
»Rapporter status til brugeren
WScript.Echo "Microsoft Office 2007 Dokument MIME-typer er blevet registreret."
 
'Under AddMimeType
Nedenfor AddMimeType (Ext, Mtype)
 
    »Få kortlægninger fra MimeMap ejendom.
    MimeMapArray = MimeMapObj.GETEX("MimeMap") 
 
    »Tilføj en ny kortlægning.
    i = Bound(MimeMapArray) + 1
    Kom fedt Bevar MimeMapArray(i)
    Sæt MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Udvidelse = Ext
    MimeMapArray(i).Mimetype = Mtype
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
    MimeMapObj.Setinfo
 
End Nedenfor

Apache MIME typen tilføjelse (for serveradministratoren)

Apache gemmer sine MIME-typer i en fil normalt placeret på $installpath / conf / filerne 'mime.types'. Se mod_mime dokumentation for mere om, hvordan det fungerer. Arch Linux installerer sine MIME-typer på /etc / httpd / conf / filerne 'mime.types' og Parallels Plesk installerer det i /usr / local / PSA / admin / conf / filerne 'mime.types'. Din fordeling kan have det i et andet sted, så find din filerne 'mime.types' fil ved at køre lokalisere filerne 'mime.types'.

Tilføj følgende linjer til din filerne 'mime.types' fil:

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

Apache MIME typen tilføjelse (For domænet ejeren med mindst FTP adgang – hjælp .htaccess fil)

Tilføj følgende tekst til dit domænes .htaccess fil, mest almindeligt i en httpdocs / Vejviser

AddType ansøgning / vnd.ms-word.document.macroEnabled.12 docm
AddType application / vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application / vnd.ms-word.template.macroEnabled.12 dotm
AddType ansøgning / vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType ansøgning / vnd.ms-powerpoint.template.macroEnabled.12 POTM
AddType ansøgning / vnd.openxmlformats-officedocument.presentationml.template potx
AddType ansøgning / vnd.ms-powerpoint.addin.macroEnabled.12 MISP
AddType ansøgning / vnd.ms-powerpoint.slideshow.macroEnabled.12 PPSM
AddType application / vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType ansøgning / vnd.ms-powerpoint.presentation.macroEnabled.12 PPTM
AddType application / vnd.openxmlformats-officedocument.presentationml.presentation PPTX
AddType ansøgning / vnd.ms-powerpoint.slide.macroEnabled.12 SLDM
AddType application / vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType ansøgning / vnd.ms-excel.addin.macroEnabled.12 xlam
AddType ansøgning / vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType ansøgning / vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application / vnd.openxmlformats-officedocument.spreadsheetml.sheet XLSX
AddType ansøgning / vnd.ms-excel.template.macroEnabled.12 xltm
AddType ansøgning / vnd.openxmlformats-officedocument.spreadsheetml.template xltx
Del
Lørdag, Februar 21, 2009 | Author:

and my Personal Rating (PR) out of 10 😉

I use Firefox so most of these won’t apply to non-FF users. Dog, 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. 🙂

Personally, 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… :-/

Hent Statusbar – 10

Jeg foretrækker at have alt i Firefox i et enkelt vindue i faner. At have en download-kasse i et separat vindue er en stor no-no for mig. It also saves screen real-estate since it is very minimal. 🙂

Video DownloadHelper – 10

Video DownloadHelper ser til streaming media – specielt på udkig efter ethvert stort indhold, der bliver downloadet. Når du klikker på ikonet, det viser dig de aktuelt-download vandløb og giver dig mulighed for at stå i kø det som et “normal” downloade.

Da du aldrig vide, om FF kommer til at gå ned eller strømmen kommer til at skære, Jeg foretrækker at gemme en kopi til mit skrivebord, og jeg kan da se videoen uden at bruge mere båndbredde for at downloade videoen igen. Også, på arbejde, når folk sender mig links til youtube eller andre medier, Jeg plejer ikke gider at se indtil meget efter – på min egen fritid eller under en pause.

Expiry Canary – 9

Denne smarte og minimal addon fortæller dig, om SSL-certifikatet for det websted, du ser i øjeblikket er snart vil udløbe. Hvis dit eget websted har en SSL-certifikat, Jeg anbefaler at du bruger denne addon til at undgå dit websted SSL certifikat udløber på grund af en simpel mangel på underretning eller fejlkommunikation.

Fasterfox – 8

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

Firebug – 9

For webudvikling og eksperimenter med sider. Awesome til test små bidder af kode samt debugging sider.

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

Awesome til gennemsyn bestemte sider gennem specifikke proxyservere. This is useful for when some sites are blocked or the Saix Transparent Proxy servers aren’t working properly. 🙂

Jeg bruger dette til at dirigere nogle trafik over proxy-servere, som jeg vil hellere ikke gå igennem standard ruter. Its also very flexible. Hvis du har mere end én proxyserver til rådighed, og den, du normalt bruger pludselig går på blink, bare skifte over til den næste. 🙂

Greasemonkey – 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 er AWESOME på blokerer reklamer. Dens lidt irriterende i starten, da du skal whiteliste alle de steder, du kan lide – but in the long run it is soooo worth it. 🙂

genoplive sider – 10

Meget nyttigt for hvis du navigerer til et websted, og det sker for at være ned. Hvis webstedet er statisk-indhold-orienteret så det gør det nemt hurtigt at finde det indhold, hvis dens cached online.

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.

Del
Tuesday, February 17th, 2009 | Author:

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. For eksempel, 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 (og godtfirewalled) 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, den (meget) 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.

Del