Archive for the Category » hosting «

khamis, March 26th, 2009 | Pengarang:

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? 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 www.dogma.swiftspirit.co.za and dogma.swiftspirit.co.za 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 dan 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, tidak 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.

Kongsi
rabu, March 18th, 2009 | Pengarang:

[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 (baik, 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
 
jika [ $# = 1 ]; then
  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 -in $1
 
 else
  echo "pem2pfx - converts a .pem formatted private-key and certificate file to an IIS-compatible .pfx file."
  echo "Usage: pem2pfx inputfile.pem"
fi

lebih…

Kongsi
Saturday, February 21st, 2009 | Pengarang:

The relatively new document types Office 2007 has given some web hosts problems when their clients want to offer documents for download. Most often, the documents are being offered by the web server as text/html which is then rendered as a ton of garbage on the web user’s screen.

The best way to resolve this is to add all the MIME types to the server’s main configuration. IIS7 for Windows already has these MIME types set up correctly by default. IIS6 and IIS5 require the MIME types to be added, as might Apache on older installations. For Apache, there is also a workaround for the individual domain owner to add the mime types via Apache’s .htaccess file.

IIS 6 MIME type addition (for the Server Administrator)

Before this can be done, ensure that your server is also set to allow direct metabase editing:

  1. Load IIS Manager: Start -> Run, “inetmgr” -> [OK]
  2. Right click theserverand clickProperties
  3. Within theInternet Information Servicestab (usually the only tab), ensure that theEnable Direct Metabase Editcheckbox is checked.
  4. Click [OK]

Be sure to back up IIS’s configuration (di sini for IIS5) beforehand. I won’t take any responsibility for an admin breaking his server. I have reason to believe this may also work on IIS5 however I have just as much reason to believe that it might just give lots of errors. If an IIS5 / Windows 2000 admin is willing to test this for me after backing up your configuration please let me know of the results.

Copy the following text into a file named msoff07-addmime.vbs and execute it once from the commandline by typing cscript msoff07-addmime.vbs and pressing Enter. If you run it more than once, the MIME types will be added each time and you will have multiple identical entries:

' This script adds the necessary Office 2007 MIME types to an IIS 6 Server.
' To use this script, just double-click or execute it from a command line.
' Running this script multiple times results in multiple entries in the
' IIS MimeMap so you should not run it more than once.
' Modified from http://msdn.microsoft.com/en-us/library/ms752346.aspx
 
Dim MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
Const ADS_PROPERTY_UPDATE = 2 
 
' Set the MIME types to be added
MimeTypesToAddArray = Array(".docm", "application/vnd.ms-word.document.macroEnabled.12", _
".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application/vnd.ms-word.template.macroEnabled.12", _
".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12", _
".potx", "application/vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12", _
".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", _
".ppsx", "application/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", "application/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", "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 kepada UBound(MimeTypesToAddArray) Langkah 2
    AddMimeType MimeTypesToAddArray(counter), MimeTypesToAddArray(counter+1)
Next
 
' 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
Loop
 
Set oExec = WshShell.Exec("net start w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Loop
 
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.
    i = UBound(MimeMapArray) + 1
    Redim Preserve MimeMapArray(i)
    Set MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Extension = Ext
    MimeMapArray(i).MimeType = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
    MimeMapObj.SetInfo
 
End Sub

Apache MIME type addition (for the 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 dan 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/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 type addition (For the domain owner with at least FTP accessusing .htaccess file)

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

AddType application/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 application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm
AddType application/vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
Kongsi
Saturday, February 21st, 2009 | Pengarang:

and my Personal Rating (PR) out of 10 😉

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

Ini adalah GUI depan untuk Cache Firefox menyimpan daripada beberapa halaman terakhir dan media. Saya telah mendapati addon ini lebih menarik daripada berguna sekarang jadi saya mungkin akan mengeluarkan tidak lama lagi.

ColorfulTabs – 9

Saya suka warna. Tab warna-perkumpulan tidak berfungsi dengan baik apabila anda mencapai kira-kira 30 tab walaupun… :-/

Muat turun Bar Status – 10

Saya lebih suka mempunyai segala-galanya dalam Firefox dalam tetingkap tunggal dalam tab. Mempunyai kotak muat turun dalam tetingkap berasingan adalah besar tidak-tidak untuk saya. Ia juga menjimatkan hartanah skrin kerana ia adalah sangat minimum. 🙂

video DownloadHelper – 10

Video DownloadHelper kelihatan untuk penstriman media – khusus mencari sebarang kandungan besar yang sedang dimuat turun. Apabila anda klik pada ikon, ia menunjukkan anda aliran kini-turun dan memberikan anda pilihan untuk beratur sebagai “normal” muat turun.

Oleh kerana anda tidak pernah tahu jika FF akan crash atau kuasa akan memotong, Saya lebih suka untuk menyimpan satu salinan ke desktop saya dan saya kemudiannya boleh melihat video tanpa menggunakan untuk memuat turun video sekali lagi lebih banyak bandwidth. juga, di tempat kerja, apabila orang menghantar saya link ke youtube atau media lain, Saya biasanya tidak mengganggu menonton sehingga banyak selepas – pada masa lapang saya sendiri atau semasa rehat.

tamat Canary – 9

Ini addon kemas dan minimum memberitahu anda jika sijil SSL untuk laman web yang anda sedang lihat tidak lama lagi akan tamat. Jika laman anda sendiri mempunyai sijil SSL, Saya cadangkan anda menggunakan addon ini untuk membantu mengelakkan sijil SSL laman web anda yang akan tamat tempoh kerana kekurangan yang mudah untuk pemberitahuan atau salah faham.

Fasterfox – 8

Fasterfox menambah beberapa pilihan rangkaian optmisation. Beberapa pilihan boleh membuat rangkaian korporat anda admin gila sedikit dengan anda walaupun. 😉

Firebug – 9

Untuk pembangunan web dan percubaan dengan laman. Awesome untuk menguji bit sedikit kod serta debugging laman.

FoxClocks – 6

err – memberitahu anda masa dalam zon masa lain. o.O terakhir berguna untuk masa yang singkat – sekarang berlebihan sejak kepala saya bekerja ia keluar lebih cepat daripada yang saya boleh pandang. rm -f

FoxyProxy – 9

Awesome untuk melayari halaman tertentu melalui pelayan proksi tertentu. Ini berguna apabila beberapa laman web yang disekat atau Saix pelayan proksi telus tidak berfungsi dengan betul. 🙂

Saya menggunakan ini untuk laluan lalu lintas lebih pelayan proksi yang saya tidak mahu pergi melalui laluan lalai. Ia juga sangat fleksibel. Jika anda mempunyai lebih daripada satu pelayan proksi yang ada dan apa yang anda biasanya menggunakan tiba-tiba menyala berkelip, hanya beralih ke satu depan. 🙂

Greasemonkey – 10

Sekarang, Saya menggunakan ini hanya untuk GooglemonkeyR skrip. skrip ini reformats Google'S hasil carian spesifikasi anda dan juga mempunyai pilihan untuk menunjukkan thumbnail kecil halaman pautan Google untuk. Greasemonkey boleh melakukan banyak lebih dan ada banyak skrip mudah tersedia untuk banyak banyak laman web.

pengepala HTTP Live – 8

Saya telah menggunakan ini beberapa kali untuk mendiagnosis isu gzip mampatan dengan pelayan web IIS. Tidak banyak lagi untuk mengatakan walaupun: Ianya berfungsi.

PageRank Live – 10 (setakat ini – hanya dipasang semalam)

addon ini seolah-olah cukup mudah. Ia mendapat PageRank dari Google dan menunjukkan dalam dulang.

NoScript – 10

NoScript adalah AWESOME pada iklan menyekat. menjengkelkan sedikit Its pada mulanya kerana anda perlu senarai putih semua laman yang anda suka – tetapi dalam jangka panjang ia adalah soooo berbaloi. 🙂

membangkitkan Laman – 10

Sangat berguna untuk jika anda menyemak imbas ke laman web dan ia berlaku akan turun. Jika laman web ini adalah statik kandungan berorientasikan maka ini menjadikannya mudah untuk mencari dengan cepat kandungan jika mereka cache talian.

Tab Mix Plus – 8

Awesome kerana jika anda mempunyai lebih daripada 7-atau-so tab.

ShowIP (menggunakan versi yang diubah suai untuk tujuan kerja – memaparkan nama berkanun pelayan syarikat itu ketika melayari) – 10

Saya tidak boleh bayangkan neraka saya telah pergi melalui untuk mengenal pasti pelayan tanpa plugin ini. baik, saya boleh. Digunakan untuk mempunyai untuk melakukan ini sepanjang masa. Saya akhirnya skrip tetapi saya tidak dapat mencari skrip asal. Berikut adalah percubaan 60 saat saya di mencipta apa yang ada dalam skrip yang:

$ cat / etc / tuan rumah | grep `menggali A @mycachingnameserver $ nama hos | grep . | grep -v "^;"`
$ menggali -x `menggali A @mycachingnameserver $ nama hos | grep ^ $ nama hos | grep A | \
  awk '/[.]/{cetak $5}' `@mycachingnameserver | grep . | grep -v "^;"

web Developer – 9

Saya digunakan sekali ini untuk mendiagnosis beberapa isu dengan halaman. Saya tidak melakukan pembangunan web banyak sehingga saya akan keluarkan satu ini. sebarang komen terhadap keupayaannya kerana saya percaya ini adalah kedudukan tertinggi add-on jika yang anda lakukan banyak kerja pembangunan web.

Kongsi
Tuesday, February 17th, 2009 | Pengarang:

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. Sebagai contoh, 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 (dan baikfirewalled) 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 pintu masuk. 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 (sangat) 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.

Kongsi