Arhivu za kategoriju » hosting «

četvrtak, March 26th, 2009 | autor:

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 i 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, ne 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.

udio
Wednesday, March 18th, 2009 | autor:

[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, ne csplitting required (dobro, 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
#lukav - brendan@swiftspirit.co.za
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
 
if [ $# = 1 ]; then
  outputfile=`echo $1 | sed 's/.pem$/.pfx/'`
 
  echo "Please specify a password below. Windows odbija uvoz .pfx certifikata s praznom lozinkom."
  openssl pkcs12 -izvoz -napolje $outputfile -u $1
 
 inače
  echo "pem2pfx - pretvara .pem formatirani privatni ključ i datoteku certifikata u .pfx datoteku kompatibilnu sa IIS."
  echo "Usage: pem2pfx inputfile.pem"
biti

više…

udio
Subota, 21. februara, 2009 | autor:

Relativno nove vrste dokumenata Office 2007 zadao je problem nekim web domaćinima kada njihovi klijenti žele ponuditi dokumente za preuzimanje. Najčešće, dokumente web server nudi kao “text / html” koja se zatim na ekranu korisnika interneta prikaže kao tona smeća.

Najbolji način da se ovo riješi je dodavanje svih MIME tipove do glavne konfiguracije servera. IIS7 za Windows već ima ove MIME tipove postavljene prema zadanim postavkama. IIS6 i IIS5 zahtijevaju dodavanje MIME tipova, kao što bi moglo Apache na starijim instalacijama. Za Apača, postoji i zaobilazno rješenje za pojedinačnog vlasnika domene da doda mimeove vrste putem Apache-a .htaccess fajl.

IIS 6 Dodavanje MIME tipa (za administratora servera)

Prije nego što se to može učiniti, pobrinite se da je i vaš server postavljen tako da dozvoljava direktno uređivanje metabaze:

  1. Opterećenje IIS Manager: Start -> Ra, “inetmgr” -> [uredu]
  2. Desni klik na “server” i kliknite “Strrsvojstva”
  3. Unutar “Internet informativne usluge” tab (obično jedina kartica), osigurati da “Enmogućnost Direct Metabase Edit” potvrdni okvir je označen.
  4. Kliknite [uredu]

Obavezno sigurnosna kopija IIS-ove konfiguracije (ovdje za IIS5) unaprijed. Neću preuzeti odgovornost za administratora koji je razbio njegov server. Imam razloga da vjerujem u ovo svibanj također radim na IIS5, međutim imam isto toliko razloga vjerovati da bi to moglo samo dati puno grešaka. Ako je IIS5 / Windows 2000 admin je spreman ovo testirati umjesto mene nakon izrade sigurnosne kopije Vaša konfiguracija javite mi rezultate.

Kopirajte sljedeći tekst u datoteku koja se zove msoff07-addmime.vbs i izvršite ga jednom iz naredbenog retka upisivanjem cscript msoff07-addmime.vbs i pritiskom na Enter. Ako ga pokrenete više puta, MIME tipovi će se dodavati svaki put i imat ćete više identičnih unosa:

'Ova skripta dodaje potreban Office 2007 MIME tipovi u IIS 6 server.
'Da koristim ovu skriptu, samo dvaput kliknite ili izvršite iz naredbenog retka.
'Pokretanje ove skripte više puta rezultira višestrukim unosima u
'IIS MimeMap, pa ga ne biste trebali pokretati više od jednom.
'Izmijenjeno sa http://msdn.microsoft.com/en-us/library/ms752346.aspx
 
Dim MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
Const ADS_PROPERTY_UPDATE = 2 
 
'Postavite MIME tipove koji će se dodati
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") 
 
'Nabavite objekt mimemap
Set MimeMapObj = GetObject("IIS://LocalHost / MimeMap")
 
'Pozovite AddMimeType za svaki par dodataka / MIME tip
Za brojač = 0 do UBound(MimeTypesToAddArray) Korak 2
    AddMimeType MimeTypesToAddArray(brojač), MimeTypesToAddArray(brojač+1)
Sljedeći
 
'Stvori objekt Shell
Set WshShell = CreateObject("WScript.Shell")
 
'Zaustavite i pokrenite IIS uslugu
Set oExec = WshShell.Exec("net stop w3svc")
Da Dok oExec.Status = 0
    WScript.Spavaj 100
Petlja
 
Set oExec = WshShell.Exec("net start w3svc")
Da Dok oExec.Status = 0
    WScript.Spavaj 100
Petlja
 
Set oExec = Ništa
 
'Prijavi status korisnika
WScript.Eho "Microsoft Office 2007 Registrovani su tipovi MIME dokumenta."
 
'AddMimeType Sub
Sub AddMimeType (Vanjski, MType)
 
    'Nabavite mapiranja iz svojstva MimeMap.
    MimeMapArray = MimeMapObj.GetEx("MimeMap") 
 
    'Dodajte novo mapiranje.
    i = UBound(MimeMapArray) + 1
    Redim Sačuvaj MimeMapArray(i)
    Set MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Produženje = Vanjski
    MimeMapArray(i).MimeType = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
    MimeMapObj.SetInfo
 
Kraj Sub

Apache MIME type addition (za administratora servera)

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 i 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 fajl, 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
udio
Subota, 21. februara, 2009 | autor:

and my Personal Rating (PR) out of 10 😉

I use Firefox so most of these won’t apply to non-FF users. kako god, 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… :-/

download Statusbar – 10

Volim imati sve u Firefox u jednom prozoru u karticama. Imati preuzimanje kutija u posebnom prozoru je veliki ne-ne za mene. It also saves screen real-estate since it is very minimal. 🙂

video DownloadHelper – 10

Video DownloadHelper traži streaming medija – posebno u potrazi za bilo koji veliki sadržaj koji se preuzet. Kada kliknete na ikonu, to vam pokazuje trenutno-skidanje potocima i daje vam mogućnost da se red kao “normalan” download.

Pošto nikad se ne zna da li FF će srušiti ili moć će se smanjiti, Ja bih radije da sačuvate kopiju na moj desktop i ja mogu onda vidite video bez upotrebe više propusnost ponovo preuzeti video. takođe, na poslu, kada ljudi pošaljite mi povezuje na YouTube ili druge medije, Ja obično ne smeta gledanje do mnogo poslije – na svoj odmor ili za vrijeme pauze.

Istek Canary – 9

Ovaj uredan i minimalne addon vam govori da li je SSL certifikat za sajt koji trenutno gledate će uskoro isteći. Ako svoju stranicu ima SSL certifikat, Preporučujem vam koristiti ovaj addon za pomoći da se izbjegne SSL certifikat web-lokacije ističe zbog jednostavnog nedostatka obavijest ili nesporazuma.

Fasterfox – 8

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

palikuća – 9

Za web razvoj i eksperimentiranje sa stranice. Awesome za testiranje malo bita koda kao i ispravljanje pogrešaka stranice.

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 za pretraživanje određene stranice kroz specifične proxy servera. This is useful for when some sites are blocked or the SAIX Transparent Proxy servers aren’t working properly. 🙂

Koristim ovu na relaciji neke saobraćaj preko proxy servera koji radije ne prolaze kroz zadani rute. Its also very flexible. Ako imate više od jednog proxy servera na raspolaganju, a jedan obično koristite odjednom ide na tren, samo prebaciti na sljedeću. 🙂

Greasemonkey – 10

Right now, I use this only for the GooglemonkeyR skripta. 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 je strašan na blokiranje oglasa. Njegova malo iritantan na prvi, jer morate belu listu sve vam se sviđaju – but in the long run it is soooo worth it. 🙂

uskrsnuti Stranice – 10

Vrlo korisno za ako dođete na lokaciju i to se dešava da bude dole. Ako je lokacija statički sadržaj orijentisan onda to olakšava brzo pronalaženje sadržaja ako je keširana 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.

udio
Tuesday, February 17th, 2009 | autor:

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. Na primjer, 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 (i dobrofirewalled) 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 prolaz. 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 (vrlo) 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.

udio