Archive for the Category » 托管 «

星期四, March 26th, 2009 | 笔者:

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”. 啧. 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 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, 不 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.

分享
星期三, 3月18日, 2009 | 笔者:

[编辑] 这么多的. 事实证明, openssl的 能够确定该密钥和证书已经是在一个单独的文件. 因此, 无 csplit可需要婷 (良好, 我希望有人读这至少学会了如何很好csplit可为). 其实, 整个脚本很可能会成为过时… blaargh. 好, 至少它提供了关于不给空口令一个很好的警示. 😀

这里是新版本:

pem2pfx – 转换包含一个私钥和签名证书到Windows兼容。pfx证书文件。PEM格式的文​​件.

#!/bin/bash
#pem2pfx
#V0.2
#狡猾 - brend一个@swiftspirit.co.za
# 一,PEM证书文件转换为。pfx格式
# $1 是源文件
 -和
 
如果 [ $# = 1 ]; 然后
  OUTPUTFILE=`回声 $1 |  的/ .pem $ /。PFX /'`
 
  回声 “请在下面指定的密码. 窗户拒绝使用空白密码导入。pfx证书。"
  openssl的PKCS12 -出口 -出 $OUTPUTFILE -在 $1
 
 其他
  回声 “pem2pfx - 转换一个。PEM格式的私钥和证书文件到IIS兼容。pfx文件。"
  回声 “用法: pem2pfx inputfile.pem"

更多…

分享
星期六, 2月21日, 2009 | 笔者:

较新的文档类型 办公室 2007 给一些web主机的问题时,他们的客户要提供下载的文件. 最常见, 该文件正在提供由web服务器 “text / html类型” 然后将其呈现为一吨垃圾的网络用户的屏幕上.

要解决这一点的最好办法是将所有的 MIME 类型服务器的主要配置. IIS7 对于Windows已经有了这些MIME类型正确设置默认. IIS6和IIS5的要求要添加的MIME类型, 作为威力 阿帕奇 在旧设备. 对于Apache, 还有一种解决方法为个人站点所有者通过Apache的添加mime类型 .htaccess的 文件.

IIS 6 MIME类型除 (对于服务器管理员)

在此之前可以做, 确保您的服务器也设置为允许直接编辑配置数据库:

  1. 负载 IIS管理器: 开始 - > Ř联合国, “INETMGR” -> [行]
  2. 右键单击 “服务器” 并点击 “PŘoperties”
  3. 内 “Internet信息服务” 标签 (通常是唯一的选项卡), 确保该 “它Ñ能够直接编辑配置数据库” 复选框被选中.
  4. 点击 [行]

一定要 备份IIS配置 (这里 对于IIS5) 事先. 我不会为一个管理员打破他的服务器不承担任何责任. 我有理由相信这 也可以用在IIS5但是我有同样多的理由相信,它可能只是给很多错误. 如果IIS5 / 视窗 2000 管理员愿意测试这个对我来说 备份后 你的配置请让我知道结果.

下面的文字复制到一个名为msoff07-addmime.vbs并执行它 一旦 在命令行键入 CSCRIPT msoff07-addmime.vbs 并按下Enter键. 如果你运行它不止一次, 的MIME类型将每次添加,你将有多个相同的条目:

“这个脚本添加必要的办公室 2007 MIME类型到IIS 6 服务器.
“要使用这个脚本, 只需双击或在命令行中执行它.
“在运行此脚本多次导致多个条目
'IIS的MimeMap所以你不应该运行它不止一次.
从http'的修改://msdn.microsoft.com/en-us/library/ms752346.aspx
 
 MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell中, oExec
常量 ADS_PROPERTY_UPDATE = 2 
 
'设置要添加的MIME类型
MimeTypesToAddArray = 排列(“DOCM", “application/vnd.ms-word.document.macroEnabled.12", _
“。的docx", “应用程序/ vnd.openxmlformats-officedocument.wordpro​​cessingml.document", _
“DOTM", “application/vnd.ms-word.template.macroEnabled.12", _
“DOTX", “应用程序/ vnd.openxmlformats-officedocument.wordpro​​cessingml.template", _
“POTM", “application/vnd.ms-powerpoint.template.macroEnabled.12", _
“potx", “应用程序/ vnd.openxmlformats-officedocument.presentationml.template", _
“PPAM", “application/vnd.ms-powerpoint.addin.macroEnabled.12", _
“PPSM", “application/vnd.ms-powerpoint.slideshow.macroEnabled.12", _
“PPSX", “应用程序/ vnd.openxmlformats-officedocument.presentationml.slideshow", _
“PPTM", “application/vnd.ms-powerpoint.presentation.macroEnabled.12", _
“PPTX", “应用程序/ vnd.openxmlformats-officedocument.presentationml.presentation", _
“sldm", “application/vnd.ms-powerpoint.slide.macroEnabled.12", _
“sldx", “应用程序/ 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", “应用程序/ vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
“xltm", “application/vnd.ms-excel.template.macroEnabled.12", _
“xltx", “应用程序/ vnd.openxmlformats-officedocument.spreadsheetml.template") 
 
'获取的MimeMap对象
 MimeMapObj = GETOBJECT(“事项://本地主机/的MimeMap")
 
“呼叫AddMimeType每对扩展/ MIME类型
 计数器 = 0  UBOUND(MimeTypesToAddArray) 步骤 2
    AddMimeType MimeTypesToAddArray(计数器), MimeTypesToAddArray(计数器+1)
下一个
 
'创建一个Shell对象
 WshShell中 = 的CreateObject(“WScript.Shell的")
 
“停止并启动IIS服务
 oExec = WshShell中.EXEC(“净停止W3SVC")
  oExec.状态 = 0
    WScript的.睡觉 100

 
 oExec = WshShell中.EXEC(“NET START W3SVC")
  oExec.状态 = 0
    WScript的.睡觉 100

 
 oExec = 
 
报告状态的用户
WScript的.回声 “微软Office 2007 文档的MIME类型已经被注册。"
 
“AddMimeType子
 AddMimeType (分机, M型)
 
    “从的MimeMap属性获取映射.
    MimeMapArray = MimeMapObj.GETEX(“的MimeMap") 
 
    '添加新的映射.= UBOUND(MimeMapArray) + 1
    REDIM 保留MimeMapArray()
     MimeMapArray() = 的CreateObject(“的MimeMap")
    MimeMapArray().延期 = 分机
    MimeMapArray().Mime类型 = M型
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, “的MimeMap", MimeMapArray
    MimeMapObj.呼叫SetInfo
 
结束 

Apache的MIME类型除 (对于服务器管理员)

Apache的存储它的MIME类型在通常位于一个文件 $INSTALLPATH / conf目录/ mime.types中. 见mod_mime一样 文档 更多关于它是如何工作. Arch Linux的 安装在它的MIME类型 /等/的httpd / conf /中的mime.types的Parallels Plesk 在安装它 /USR /本地/ PSA /管理/ conf /中的mime.types. 你的发行版可能会在另一个地方, 所以找到你 mime.types中 通过运行文件 找到mime.types中.

将下列语句添加到您的mime.types文件:

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类型除 (对于网站所有者,至少 FTP 访问 – 利用。htaccess文件)

将以下文本添加到您的域的 .htaccess的 文件, 最常用的一种 上传至httpdocs / 目录

将AddType application/vnd.ms-word.document.macroEnabled.12 DOCM
将AddType 应用/ vnd.openxmlformats-officedocument.wordpro​​cessingml.document的docx
将AddType application/vnd.ms-word.template.macroEnabled.12 DOTM
将AddType 应用/ vnd.openxmlformats-officedocument.wordpro​​cessingml.template DOTX
将AddType application/vnd.ms-powerpoint.template.macroEnabled.12 POTM
将AddType 应用/ 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 应用/ vnd.openxmlformats-officedocument.presentationml.slideshow PPSX
将AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 PPTM
将AddType 应用/ vnd.openxmlformats-officedocument.presentationml.presentation PPTX
将AddType application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm
将AddType 应用/ 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 应用/ vnd.openxmlformats-officedocument.spreadsheetml.sheet XLSX
将AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
将AddType 应用/ vnd.openxmlformats-officedocument.spreadsheetml.template xltx
分享
星期六, 2月21日, 2009 | 笔者:

… 我的个人积分 (公关) 出 10 😉

我用 火狐 所以大部分这些并不适用于非FF用户. 但, 我会非常非常有兴趣知道我还有什么其他插件的朋友, 用户, 和随机websurfers觉得有趣或有用的给他们. 有你的发言权,并让我们知道你为什么爱你爱的插件. 🙂

亲自, 我宁愿插件是不侵扰. 理想情况下, 一个插件必须有一个最小的接口,给我一个可测量的好处对我来说,保持现在的安装.

CacheViewer – 7

这是一个GUI前端缓存火狐保持最后几页和媒体. 我发现这个插件比现在有用更有趣所以我可能会在短期内将其删除.

ColorfulTab​​s – 9

我喜欢的颜色. 该选项卡的颜色分组并不能很好地工作,当你达到约 30 虽然标签… :-/

下载状态栏 – 10

我喜欢拥有一切在Firefox在一个窗口中的选项卡. 有一个下载框在一个单独的窗口是一个很大的禁忌我. 这也节省了屏幕房地产,因为它是很小的. 🙂

视频DownloadHelper – 10

视频DownloadHelper寻找流媒体 – 专找正在下载任何内容大. 当您点击图标, 它显示了你当前所下载的流,并为您排队它作为一个选项 “正常” 下载.

因为你永远不知道,如果FF是要崩溃或电源要切断, 我宁愿一个副本保存到我的桌面,然后我可以观看视频,而无需使用更多的带宽重新下载该视频. 还, 在工作, 当人们向我发送链接到YouTube或其他媒体, 我平时也懒得看后至远 – 在我自己的活动或休息时.

到期金丝雀 – 9

这种整齐和最小的插件告诉你,如果你当前正在查看的网站的SSL证书很快将到期. 如果你的网站有一个SSL证书, 我建议你​​使用这个插件,以帮助避免您的网站的SSL证书到期,由于一个简单的缺乏的通知或沟通不畅.

Fasterfox – 8

Fasterfox增加了一些网络optmisation选项. 一些选项可以让您的企业网络管理员一点点疯狂与你虽然. 😉

放火者 – 9

对于Web开发和实验页. 真棒用于测试的代码小位以及调试页面.

FoxClocks – 6

犯错 – 告诉你在其他时区的时间. o.O是有益的时间很短 – 现在,因为我的头它的冗余工作出来比我更快一目了然. RM-F

FoxyProxy的 – 9

真棒,通过特定的代理服务器浏览特定网页. 这是当一些网站被封锁或有用的 Saix的 透明代理服务器工作不正常. 🙂

我用这个路由部分流量通过代理服务器,我宁可不去通过缺省路由. 它也非常灵活. 如果您有多个代理服务器可用的和一个你平时使用突然那张闪烁, 刚刚切换到下一个. 🙂

Greasemonkey的 – 10

眼下, 我用这个只为 GooglemonkeyR 脚本. 这个脚本会重新格式化 谷歌的搜索结果您的规格,也有一个选项,以显示小缩略图的网页谷歌链接. Greasemonkey的可以做 很多 越来越有大量的现成的脚本 可用的 很多很多的网站.

现场的HTTP标头 – 8

我用这几次诊断与IIS Web服务器的gzip压缩问题. 别的不多,虽然说: 它的工作原理.

现场的PageRank – 10 (到目前为止 – 昨天才安装了它)

这个插件似乎很简单. 它得到的PageRank从谷歌并显示在托盘.

NoScript的 – 10

NoScript的是真棒在阻止广告. 它有点恼人起初,因为你有白名单的所有你喜欢的网站 – 但是从长远来看,这是SOOOO值得的. 🙂

复活页 – 10

如果你浏览到一个网站,它正好是下降的非常有用的. 如果该网站是静态的内容为导向的那么这可以很容易地快速找到内容,如果其网上缓存.

标签Mix Plus的 – 8

真棒,如果你有超过7-或-SO选项卡.

ShowIP来自 (采用改良为工作目的的一个版本 – 浏览时会显示公司服务器的规范名称) – 10

我无法想象的地狱,我就必须要经过识别服务器没有这个插件. 好, 我可以. 曾经有做这一切的时候. 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 -v "^;"`
$ dig -x `dig A $hostname @mycachingnameserver | grep ^$hostname | grep A | \
  awk '/[.]/{print $5}'` @mycachingnameserver | 握 . | 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 如果 you’re doing a lot of web development work.

分享
Tuesday, February 17th, 2009 | 笔者:

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. 例如, 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 RAIð 10 for the rest (the media part).

This didn’t work out at all.

I got as far as having an efficient (和 良好firewalled) 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 网关. 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, 该 (很) 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) 为 “local-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.

分享