试下vultr

试用下了下东京vultr节点,发现速度比linode有优势,可能后者口碑宣传、投放广告在国内用户多有关系。选用了$3.50/mo、1 CPU 512MB Memory、500GB Bandwidth这款,送ip4地址,有兴趣的可以试用,支持支付宝付款。预付了$10,可以使用3个月,搭个wp或者ocserv毫无压力,用ocserv看油管1080pHD可以达到800kBps。

WordPress后台用https访问,前台使用http时的设置

标题好长,一口气喘不过来。

WordPress后台设置https登录,貌似安全很多,通过在wp-config.php添加以下代码实现。

define(‘FORCE_SSL_ADMIN’,true);

在WordPress官方文档也提到在http和https两个虚拟主机里分别设置一个地址相同的链接:

Sometimes, you want your whole wp-admin to run over a secure connection using the https protocol. Conceptually, the procedure works like this:

Set up two virtual hosts with the same url (the blog url), one secure, the other not.
On the secure virtual host, set up a rewrite rule that shuttles all non-wp-admin traffic to the insecure site.
On the insecure virtual host, set up a rewrite rule that shuttles all traffic to wp-admin to the secure host.
Put in a filter (via a plugin) that filters the links in wp-admin so that once activated, administrative links are rewritten to use https and that edits cookies to work only over encrypted connections.

问题:不想开启全站https,同时http和https虚拟主机设置documentroot为不同目录时,用rewrite转来转去实在麻烦。

其实通过Apache别名可以简单搞定,在https虚拟主机设置里写入如下代码:

Alias /blogurl /pathto/http/blogurl

这样,两个虚拟主机使用的是同一个目录,还可以避免插件、主题、上传文档各种不同步问题。
前面的/blogurl指的是Wordpress url地址,比如这里就是/archives。后面的/blogurl代表物理http WordPress目录,

不知道还有什么没发现的问题?

参考:https://codex.wordpress.org/Administration_Over_SSL

WordPress数据库更新备忘

因为使用了不良插件,在数据库随意添加表而没有任何提示,导致数据库急剧增大,所以在phpMyAdmin中删除了该表。同时发现一个警告

超过一个 INDEX 键被设在字段 `comment_approved`中

Gooogle了老长时间,没个定论,最有建设性的意见就是“既然blog表现正常就不用管它了!” 郑重提示:安装插件前多看,多Google!

通过MobilePress打造你的手机版WordPress

前文曾经介绍过通过Mofuse托管一个手机可以访问的blog,不过呢有两个缺点,需要建立一个子域名并且不可以评论。正如前文所说可以用一个WordPress插件使手机可直接访问:那就是MobilePress,这里下载http://wordpress.org/extend/plugins/mobilepress/

下载这个插件安装到Plugins目录,在WordPress后台开启即可,它可以自动识别Opera Mini、Windows Mobile、iPhone等浏览器,当发现你是用手持设备浏览时,自动替换WordPress默认的模板为MobilePress模板,如果你不喜欢系统自带的还可以自己美化。

截图如下:

MobilePress下访问WordPress

通过MoFuse打造你的移动版Blog

1、现在你可以在手机上通过m.behindGFW.com来访问移动版的《Blog Behind GFW》了,这个服务是托管在Mofuse上的,类似于feedsky的域名绑定服务。在dns服务器上修改或创建一个子域名,cname到mofuse服务器,就可以通过你的自定义域名(m.behindGFW.com)访问你的移动版blog了。个人感觉提供域名绑定服务可满足下blogger的虚荣心,毕竟是在自己的域名上的有比较专业的感觉,前不久这个服务还是收费的哦。

再介绍其他两种将你的网站转换为移动服务的方法:

2、通过个Google的http://www.google.com/gwt/n服务,在文本框中输入你想访问的网址,回车,你就可以看见移动版的网页了。特定:Google出品,速度快、稳定。

3、或者你可以给你的wordpress加上插件,wordpress plugins目录里提供了n多提供移动服务的插件,你只需简单下载激活即可使用。特点:对用户透明,无须输入另外的网址。