以前网站使用的https是在腾讯云上免费申请的(1年),最近一直没关心过博客,今日一看才发现https到期了,导致网站不能正常访问。
在腾讯云上继续申请免费证书,发现一直处于待验证状态,不知道是什么原因。于是换了在freessl.org网站上申请。
在freessl.org上申请也是遇到好多问题。打开freessl.org首页,输入一级域名,点击“创建免费的SSL证书”。在点击之前freessl.org提供了两种证书:TrustAsia
和Let's Encrypt
。 freessl.org推荐的TrustAsia
,使用这个证书我一直没有通过,最后选择了Let's Encrypt
才弄成功。
So, everytime when I have to start my node apps I often forgot to run my MongoDB service and it is a bit annoying where you have to have one tab dedicated to something you won't touch at all and I thought I should find a way to run this from my startup item on my Mac OS X.
Luckily, this post from Hunter Ford's blog explains how to run your MongoDB in your Startup item on Mac OS X and here is how:
Create a file call org.mongo.mongod.plist in /Library/LaunchDaemons/
If you use vim
you can do like this:
sudo vim /Library/LaunchDaemons/org.mongo.mongod.plist
昨天遇到在MacOS中Safari浏览器中的iframe引用第三方网站(跨域)无法创建cookie,在Chrome和FireFox中都正常,需要将Safari的偏好设置中的隐私 - Cookie和网站数据 - 始终允许 的选项勾上即可。但这作为浏览器的默认配置(默认为允许来自我访问的网站)我们不可能让用户去改变这个设置,所以此方法不可行。
今天迁移MongoDB数据库出现了很奇怪的问题,使用的方法如下:
备份方法:
mongodump -h dbhost -d dbname -o dbdirectory
还原方法:
mongorestore -h <hostname><:port> -d dbname <path>
很长一段时间了,同事说我写的网站的登录页面卡巴斯基对他报毒,提示信息是:
对象名称:
HEUR:Trojan.Script.Generic
对象类型:
木马程序
我居然能写木马程序了?一脸懵逼了(我没遇到过,因为我没用过卡巴斯基)。略微看了一下,真不知道什么情况。