<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Soul Of Free Loop &#187; 主机空间</title>
	<atom:link href="https://zohead.com/archives/category/network/hosting/feed" rel="self" type="application/rss+xml" />
	<link>https://zohead.com</link>
	<description>Uranus Zhou&#039;s Blog</description>
	<lastBuildDate>Sat, 19 Jul 2025 15:42:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8</generator>
	<item>
		<title>暂时迁移被爬虫扒得内存不足的VPS</title>
		<link>https://zohead.com/archives/vps-anti-spider/</link>
		<comments>https://zohead.com/archives/vps-anti-spider/#comments</comments>
		<pubDate>Sat, 11 Feb 2017 14:44:57 +0000</pubDate>
		<dc:creator><![CDATA[Uranus Zhou]]></dc:creator>
				<category><![CDATA[主机空间]]></category>
		<category><![CDATA[360Spider]]></category>
		<category><![CDATA[Bluemix]]></category>
		<category><![CDATA[HighSpeedWeb]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[内存不足]]></category>
		<category><![CDATA[容器]]></category>
		<category><![CDATA[爬虫]]></category>

		<guid isPermaLink="false">https://zohead.com/?p=1356</guid>
		<description><![CDATA[VPS 内存不足问题 最近一两个月我在查看 VPS 运行日志的时候，经常发现 kernel 日志中会有 Out of memory 内存不足报错，而且报错基本都是 php-fpm 引起的： 从日志里可以看到每个 php-fpm 进程的 rss 内存占用都接近 30 MB，我之前就已经将 LNMP 环境里的 php-fpm.conf 配置文件中的 pm.max_children 改为 8，这样如果碰到同时请求数较多的情况，php-fpm 就可能会占用 240 MB 内存。再加上 MySQL、BTSync 等其它程序也要占用内存，我这个在 HighSpeedWeb 上购买的 256 MB 内存的  [&#8230;]]]></description>
				<content:encoded><![CDATA[<h2 id="vps-out-of-memory">VPS 内存不足问题</h2>
<p>最近一两个月我在查看 VPS 运行日志的时候，经常发现 kernel 日志中会有 Out of memory 内存不足报错，而且报错基本都是 <code>php-fpm</code> 引起的：</p>
<pre class="brush: bash; title: ; notranslate">
root@zoserver:~# cat /var/log/kern.log
Dec 15 20:11:43 zoserver kernel: [55751339.090508] Out of memory in UB 1253: OOM killed process 32239 (php-fpm) score 0 vm:56336kB, rss:29832kB, swap:0kB
Dec 15 20:11:56 zoserver kernel: [55751352.643620] Out of memory in UB 1253: OOM killed process 32238 (php-fpm) score 0 vm:55580kB, rss:29444kB, swap:0kB
Dec 15 20:11:57 zoserver kernel: [55751353.609602] Out of memory in UB 1253: OOM killed process 32242 (php-fpm) score 0 vm:56088kB, rss:29800kB, swap:0kB
Dec 15 20:12:23 zoserver kernel: [55751379.072308] Out of memory in UB 1253: OOM killed process 32240 (php-fpm) score 0 vm:55496kB, rss:29520kB, swap:0kB
Dec 15 20:12:45 zoserver kernel: [55751401.084746] Out of memory in UB 1253: OOM killed process 32225 (php-fpm) score 0 vm:55848kB, rss:29564kB, swap:0kB
Dec 15 20:13:22 zoserver kernel: [55751438.326072] Out of memory in UB 1253: OOM killed process 32266 (php-fpm) score 0 vm:56008kB, rss:29880kB, swap:0kB
Dec 15 20:13:36 zoserver kernel: [55751452.087637] Out of memory in UB 1253: OOM killed process 32278 (php-fpm) score 0 vm:55328kB, rss:29356kB, swap:0kB
Dec 15 20:13:37 zoserver kernel: [55751453.035146] Out of memory in UB 1253: OOM killed process 32241 (php-fpm) score 0 vm:55752kB, rss:29784kB, swap:0kB
</pre>
<p>从日志里可以看到每个 <code>php-fpm</code> 进程的 rss 内存占用都接近 30 MB，我之前就已经将 LNMP 环境里的 <code>php-fpm.conf</code> 配置文件中的 <code>pm.max_children</code> 改为 8，这样如果碰到同时请求数较多的情况，<code>php-fpm</code> 就可能会占用 240 MB 内存。再加上 MySQL、BTSync 等其它程序也要占用内存，我这个在 <a href="https://zohead.com/archives/blog-hswvps/">HighSpeedWeb</a> 上购买的 256 MB 内存的 VPS 应该就撑不住了，出现 Out of memory 错误也就不足为怪了。</p>
<p>为了找到原因，我决定检查一下出现内存不足时候的 nginx 请求日志：</p>
<pre class="brush: bash; title: ; notranslate">
root@zoserver:~# more /home/wwwlogs/zohead.log
64.79.85.205 - - [15/Dec/2016:20:11:43 +0800] &quot;GET /archives/tcpkill-nfs/ HTTP/1.1&quot; 200
13304 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:43 +0800] &quot;GET /archives/newifi-mini-openwrt/ HTTP/1.1&quot; 200
18841 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:43 +0800] &quot;GET /archives/category/technology/linux/ubuntu/ HTTP/1.1&quot; 200
11921 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:43 +0800] &quot;GET /archives/category/technology/phone/ HTTP/1.1&quot; 200
12800 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:43 +0800] &quot;GET /archives/category/technology/ HTTP/1.1&quot; 200
14862 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:44 +0800] &quot;GET /archives/category/technology/android/ HTTP/1.1&quot; 200
15127 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:44 +0800] &quot;GET /archives/zerotier-container/ HTTP/1.1&quot; 200
16323 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:44 +0800] &quot;GET /archives/tag/bash/ HTTP/1.1&quot; 200
11221 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
-
64.79.85.205 - - [15/Dec/2016:20:11:44 +0800] &quot;GET /archives/tag/ssh/ HTTP/1.1&quot; 200
11266 - &quot;-&quot; &quot;Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)&quot;
</pre>
<p>这就明显是一个不太友善的爬虫干的好事了，由于请求日志太多这里就不列出来了，统计之后可以发现这个 SMTBot 在十几秒钟的时间里请求了几百次，明显超出了 VPS 能处理的范围了。</p>
<p>另外我在检查日志之后还发现经常有各种初步练习用的爬虫也在不断访问 WordPress 博客数据，这种爬虫的特征就是使用各种不同的 User agent：</p>
<pre class="brush: bash; title: ; notranslate">
root@zoserver:~# more /home/wwwlogs/zohead.log
138.197.19.145 - - [17/Dec/2016:08:28:49 +0800] &quot;GET /robots.txt HTTP/1.1&quot; 200
145 - &quot;-&quot; &quot;Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:00 +0800] &quot;GET /wp-login.php HTTP/1.1&quot; 200
2464 - &quot;http://zohead.com&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:01 +0800] &quot;GET /archives/category/technology/network-tech/https-ssl/ HTTP/1.1&quot; 200
8604 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:03 +0800] &quot;GET /archives/category/travel/ HTTP/1.1&quot; 502
166 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:03 +0800] &quot;GET /archives/tag/video/ HTTP/1.1&quot; 200
11459 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:03 +0800] &quot;GET /guestbook/ HTTP/1.1&quot; 200
9962 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:03 +0800] &quot;GET /archives/tasker-shell/ HTTP/1.1&quot; 200
13094 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:04 +0800] &quot;GET /archives/category/technology/ HTTP/1.1&quot; 200
13717 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:04 +0800] &quot;GET /archives/tag/android/ HTTP/1.1&quot; 200
13879 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:04 +0800] &quot;GET /archives/category/technology/android/ HTTP/1.1&quot; 200
13842 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36&quot;
-
138.197.19.145 - - [17/Dec/2016:08:29:05 +0800] &quot;GET /archives/author/admin/ HTTP/1.1&quot; 200
13716 - &quot;https://zohead.com&quot; &quot;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0&quot;
</pre>
<p>然而这些小爬虫发起请求来也是毫不手软，基本没有在多个请求之间加什么延时的。不过还好看起来爬虫还是读了 <code>robots.txt</code> 文件的，因此可以考虑在 <code>robots.txt</code> 和 nginx 配置里做一些限制。</p>
<h2 id="treatment">防治措施</h2>
<h3 id="mod-robots-txt">修改 robots.txt</h3>
<p>首先把原来不太重视的 <code>robots.txt</code> 文件完善一下，增加了一些限制，大概如下：</p>
<pre class="brush: plain; title: ; notranslate">
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-content/
Disallow: /wp-includes/
Disallow: /*?replytocom=*
Crawl-delay: 30
Sitemap: https://zohead.com/sitemap.xml
</pre>
<p>禁止所有爬虫访问一些 WordPress 内部目录，增加了 <code>Crawl-delay</code> 参数，并设置为 30 秒，防止产生过多的请求。</p>
<h3 id="mod-nginx-config">修改 nginx 配置</h3>
<p>由于并不是所有爬虫都会读取并遵守 robots 协议，特别是 Google 和百度这样的搜索巨头也明确表态不支持上面增加的 <code>Crawl-delay</code> 参数，为此还是需要修改 nginx 配置直接限制并发连接数：</p>
<pre class="brush: bash; title: ; notranslate">
root@zoserver:~# more /usr/local/nginx/conf/nginx.conf
http {
	limit_req_zone $anti_spider zone=anti_spider:60m rate=200r/m;
}

server {
	limit_req zone=anti_spider burst=5 nodelay;
	set $anti_spider $http_user_agent;
}
</pre>
<p>上面只是简单节选列出了 nginx 服务器配置的修改，使用 <code>limit_req_zone</code> 限制每分钟 200 个请求，最大并发为 5。</p>
<p>经过上面两步修改之后，VPS 日志里的内存不足错误看起来是减少了，但是好景不长，直到过几天我再去检查内核日志和 nginx 请求日志时发现来了一个臭名昭著的家伙，其频繁的请求仍然导致 VPS 出现 Out of memory 问题：</p>
<pre class="brush: bash; title: ; notranslate">
root@zoserver:~# more /home/wwwlogs/zohead.log
42.236.99.242 - - [09/Jan/2017:05:41:44 +0800] &quot;GET /archives/tag/keepassdroid/?wpmp_switcher=mobile HTTP/1.1&quot; 503
608 - &quot;https://m.zohead.com/archives/tag/keepassdroid/?wpmp_switcher=mobile&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
-
42.236.99.178 - - [09/Jan/2017:05:41:44 +0800] &quot;GET /archives/easymoney-to-feidee/?lang=en&amp;replytocom=641replytocom=641replytocom=641replytocom=640replytocom=641replytocom=641replytocom=640replytocom=640&amp;wpmp_switcher=desktop HTTP/1.1&quot; 503
608 - &quot;https://zohead.com/archives/easymoney-to-feidee/?lang=en&amp;replytocom=641replytocom=641replytocom=641replytocom=640replytocom=641replytocom=641replytocom=640replytocom=640&amp;wpmp_switcher=desktop&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
-
42.236.99.230 - - [09/Jan/2017:05:41:45 +0800] &quot;GET / HTTP/1.1&quot; 301
178 - &quot;http://www.zohead.com/&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
-
42.236.99.194 - - [09/Jan/2017:05:41:47 +0800] &quot;GET /archives/qiniu-https-tamper/?lang=en&amp;replytocom=2190 HTTP/1.1&quot; 200
12300 - &quot;https://zohead.com/archives/qiniu-https-tamper/?lang=en&amp;replytocom=2190&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
-
42.236.99.206 - - [09/Jan/2017:05:41:48 +0800] &quot;GET /archives/category/technology/linux/page/3/?wpmp_switcher=true HTTP/1.1&quot; 503  
608 - &quot;https://m.zohead.com/archives/category/technology/linux/page/3/?wpmp_switcher=true&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
-
180.153.236.19 - - [09/Jan/2017:05:41:48 +0800] &quot;GET /archives/category/technology/cplusplus/ HTTP/1.1&quot; 503
608 - &quot;https://m.zohead.com/archives/category/technology/cplusplus/&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
-
42.236.99.154 - - [09/Jan/2017:05:41:48 +0800] &quot;GET /comments/feed/?lang=en HTTP/1.1&quot; 503
608 - &quot;http://zohead.com/comments/feed/?lang=en&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
-
180.153.236.165 - - [09/Jan/2017:05:41:49 +0800] &quot;GET /archives/tag/start-stop-daemon/?lang=en&amp;wpmp_switcher=mobile HTTP/1.1&quot; 200
8502 - &quot;http://zohead.com/archives/tag/start-stop-daemon/?lang=en&amp;wpmp_switcher=mobile&quot; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider&quot;
</pre>
<p>上面只是同一时段博客访问日志的很小一部分，360 搜索的 360Spider 爬虫在不断访问博客，而且看起来 360 服务器集群机器也是相当多，360 蜘蛛的 IP 地址列表可以在其官网查看：</p>
<p><a href="https://www.so.com/help/spider_ip.html">https://www.so.com/help/spider_ip.html</a></p>
<p>经过分析日志我发现最要命的是 360 爬虫根本就没有读取 <code>robots.txt</code> 文件，这样根本谈不上让 <code>Crawl-delay</code> 之类的参数发挥作用。</p>
<h2 id="migrate-server">迁移服务器</h2>
<p>经过我差不多一个月的观察，现在 VPS 遇到的内存不足问题基本都是由 360 爬虫引起的，另外偶尔也有一些小爬虫不按规矩狂发请求。只是考虑到现在这个 256 MB 内存的 VPS 始终不是长久之计，因此还是想把博客迁移到其它服务器上。</p>
<p>首先看了看 HighSpeedWeb 现有的<a href="https://billing.highspeedweb.net/cart.php?gid=19">套餐</a>，512 MB 内存以上的 OpenVZ 或 KVM 套餐现在价格也都不太便宜。一番参考之后我准备先将博客迁移到 IBM <a href="https://zohead.com/archives/ibm-bluemix-docker/">Bluemix</a> 容器平台顶着，因为看起来 Bluemix 容器系统里能使用的突发内存量还是比较多的，而且毕竟目前 Bluemix 平台在我这几个月的使用感受来看除了计费不太清晰之外其它方面还算比较稳定的。</p>
<p>现在博客域名的 A 记录已经修改，你现在看到的页面就是运行在 Bluemix 容器上的了。另外最近碰到好几次 HTTP 的博客网站老是被运营商插入广告代码，于是我也直接禁用了 HTTP 支持，现在必须以 HTTPS 方式访问本博客了。这么一来只是略微可惜了原来 HighSpeedWeb 相当稳定的服务器了：</p>
<pre class="brush: bash; title: ; notranslate">
root@zoserver:~# uptime
 21:29:27 up 325 days,  6:16,  1 user,  load average: 0.00, 0.00, 0.00
</pre>
<p>HighSpeedWeb VPS 服务器已经稳定运行了将近一年时间了，基本上自从上次续费时不小心重启了一下服务器之后 DNSPod 的监控就没有再报过警了。因此这段时间如果 Bluemix 容器万一出什么幺蛾子还能尽快切换回 HighSpeedWeb，最后还是希望现在的 Bluemix 容器能尽量稳定运行了，祝大家元宵节玩的开心。</p>
]]></content:encoded>
			<wfw:commentRss>https://zohead.com/archives/vps-anti-spider/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>博客搬家到HighSpeedWeb VPS了</title>
		<link>https://zohead.com/archives/blog-hswvps/</link>
		<comments>https://zohead.com/archives/blog-hswvps/#comments</comments>
		<pubDate>Mon, 02 Mar 2015 18:04:41 +0000</pubDate>
		<dc:creator><![CDATA[Uranus Zhou]]></dc:creator>
				<category><![CDATA[主机空间]]></category>
		<category><![CDATA[网络]]></category>
		<category><![CDATA[HighSpeedWeb]]></category>
		<category><![CDATA[Linost]]></category>
		<category><![CDATA[Shadowsocks]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[主机]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://zohead.com/?p=860</guid>
		<description><![CDATA[2013年的4月份因为不堪忍受 000webhost 三蛋空间的蛋疼速度和恶心无故封账户机制，切换到 Linost 空间用了差不多两年了。平心而论 Linost 的主机还算比较稳定，虽然不定时的抽风一下，但做简单的博客主机还是可以，期间还在 Linost 上买了一年的 SSH 代理服务并使用至今，现在看到 SSH 代理服务器被 GFW 封的越来越厉害，于是想自己搞个 VPS 跑 WordPress 博客程序，顺带跑下 Shadowsocks 用来爬墙比较方便（只要不是流量很高被 GFW 盯上了一般不易被封）。 左挑右选之后还是决定先拿一个性价比比较高的 VPS 来练练手，因此在 Linost  [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>2013年的4月份因为不堪忍受 000webhost 三蛋空间的蛋疼速度和恶心无故封账户机制，切换到 <a href="https://my.linost.com/aff.php?aff=1674" target="_blank">Linost</a> 空间用了差不多两年了。平心而论 <a href="https://my.linost.com/aff.php?aff=1674" target="_blank">Linost</a> 的主机还算比较稳定，虽然不定时的抽风一下，但做简单的博客主机还是可以，期间还在 <a href="https://my.linost.com/aff.php?aff=1674" target="_blank">Linost</a> 上买了一年的 SSH 代理服务并使用至今，现在看到 SSH 代理服务器被 GFW 封的越来越厉害，于是想自己搞个 VPS 跑 WordPress 博客程序，顺带跑下 Shadowsocks 用来爬墙比较方便（只要不是流量很高被 GFW 盯上了一般不易被封）。</p>
<p>左挑右选之后还是决定先拿一个性价比比较高的 VPS 来练练手，因此在 <a href="https://my.linost.com/aff.php?aff=1674" target="_blank">Linost</a> 主机快到期的时候在 HighSpeedWeb 上买了一个 OpenVZ 256MB 内存的 VPS。官网在此：</p>
<p><a href="http://www.highspeedweb.net/" target="_blank">http://www.highspeedweb.net/</a></p>
<p>OpenVZ 256MB VPS 正常价格是 15 美元一年，使用 <strong>25OFF</strong> 这个优惠码之后可以打 75 折还是相当划算的。购买之前还比较顺利，但在提交完订单准备 PayPal 付款时遇到麻烦，主机系统报未通过 MaxMind 检查，提示是高危欺诈订单，而且我填的名字、地址、电话之类的都是真实信息，无奈只能提交一个工单，说明我的 IP 地址和实际地址是对应的，几番沟通之后终于客服把订单给恢复正常了。</p>
<p>为节省内存，VPS 用了 Debian 7.0 32 位的系统，系统里的无关服务基本都被停掉，只保留了 SSH、cron 等基础服务，移除掉自带的 Apache 支持（256MB 内存真心有点带不动），然后从 <a href="http://www.lnmp.org/" target="_blank">http://www.lnmp.org/</a> 上下载了最新稳定版的 LNMP 服务器套件并编译安装。</p>
<p>把原来备份的 Web 目录文件和 MySQL 数据导入 VPS 系统，稍加修修改，更改域名 A 记录之后，博客网站就迁移过来。接下来就装了一个 Shadowsocks 服务器用来爬墙，可惜由于 OpenVZ 系统诸多限制无法优化提升代理性能，但日常使用也还算没什么问题。</p>
<p>最后把年前弄的七牛云存储的 CDN 加速功能开启了，用 WordPress 另外安装的 WP Super Cache 插件设置 CDN 服务器地址之后让七牛云存储缓存静态内存，结果博客网页整体打开速度也提升了，最主要这样也减少了对我这种低配置 VPS 的 CPU 和 内存压力。</p>
<p>虽然 OpenVZ 的 VPS 相对与 KVM 和 Xen 的来说可玩性低些，但下面等有空时还是可以再搞搞 VPS 上的 rsync 备份之类的，最后还是 HighSpeedWeb 尽量稳定咯~~~</p>
]]></content:encoded>
			<wfw:commentRss>https://zohead.com/archives/blog-hswvps/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>交点学费-更换博客空间</title>
		<link>https://zohead.com/archives/change-blog-host/</link>
		<comments>https://zohead.com/archives/change-blog-host/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 13:48:20 +0000</pubDate>
		<dc:creator><![CDATA[Uranus Zhou]]></dc:creator>
				<category><![CDATA[主机空间]]></category>
		<category><![CDATA[网络]]></category>
		<category><![CDATA[000webhost]]></category>
		<category><![CDATA[Linost]]></category>
		<category><![CDATA[主机]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[备份]]></category>

		<guid isPermaLink="false">http://zohead.com/?p=393</guid>
		<description><![CDATA[本文同步自（最佳显示效果请点击）：https://zohead.com/archives/change-blog-host/ 前两天收到一个老外发的咨询 XOLO X900 kernel module 的邮件，并告知原来的博客文章链接无法打开。几天没上才发现博客网站无法正常访问了，访问时会跳到提供商 000webhost（俗称三蛋空间） 的错误页面。 登录到空间的 CPanel 后台，就看到错误提示： Suspended (Suspended for violating 20%+ CPU usage limit for more than 1000 times. Please upgrade  [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>本文同步自（最佳显示效果请点击）：<a href="https://zohead.com/archives/change-blog-host/" target="_blank">https://zohead.com/archives/change-blog-host/</a></p>
<p>前两天收到一个老外发的咨询 XOLO X900 kernel module 的邮件，并告知原来的博客文章链接无法打开。几天没上才发现博客网站无法正常访问了，访问时会跳到提供商 000webhost（俗称三蛋空间） 的错误页面。</p>
<p>登录到空间的 CPanel 后台，就看到错误提示：</p>
<p>Suspended (Suspended for violating 20%+ CPU usage limit for more than 1000 times. Please upgrade to our premium UNLIMITED hosting at www.hosting24.com to get your account reactivated.)</p>
<p>实在不明白我这种日访问量连 50 都不到的纯博客空间为什么会占用这么多 CPU 资源，更令人不明白的是 000webhost 没有发送任何警告邮件就直接将网站关停。由于我的网站和数据库数据还是今年春节时才备份的，因此春节后的几篇文章没有备份。</p>
<p>继续到 CPanel 后台的尝试恢复，发现所有操作都不能进行，连备份恢复文件功能都被禁用，FTP 不能登录，MySQL 数据库直接不能连接，只能做升级到高级版本的操作。没有办法只能发 ticket 给相关人员，希望可以重新激活下好恢复数据，结果一直没有回复。后来再 Google 这次遇到的问题，发现这个 CPU usage 问题可不是个例，很多人的一些小站点都遇到，而已基本都说是除非升级到 premium 否则不给恢复数据，并且关停网站之前没有任何通知。</p>
<p>看到这种评价也不想折腾了，干脆找到以前一个网友推荐的 <a href="https://my.linost.com/aff.php?aff=1674" target="_blank">Linost</a> 主机，国人经营的，也不贵，看着还可以，就花了 100 多大洋买了一年。然后将所有网站和数据库数据都恢复到新的 <a href="https://my.linost.com/aff.php?aff=1674" target="_blank">Linost</a> 主机上。迁移过程也很顺利，只要改下数据库的地址、名称、用户名、密码之类就可以，然后上 DNSPod 将域名的 A 记录重新指向就基本都 OK 了。</p>
<p>当然最重要的还是学到的教训 - 数据在别人手里，就必须要经常备份，同时也不能将鸡蛋都放在一个篮子里。 ^_^</p>
]]></content:encoded>
			<wfw:commentRss>https://zohead.com/archives/change-blog-host/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>一个比较烂的主机空间 - GigaWebHost</title>
		<link>https://zohead.com/archives/webhosting-gigawebhost/</link>
		<comments>https://zohead.com/archives/webhosting-gigawebhost/#comments</comments>
		<pubDate>Mon, 04 Jun 2012 16:18:28 +0000</pubDate>
		<dc:creator><![CDATA[Uranus Zhou]]></dc:creator>
				<category><![CDATA[主机空间]]></category>
		<category><![CDATA[网络]]></category>
		<category><![CDATA[GigaWebHost]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[ticket]]></category>
		<category><![CDATA[主机]]></category>
		<category><![CDATA[护照]]></category>
		<category><![CDATA[虚拟]]></category>

		<guid isPermaLink="false">http://zohead.com/?p=216</guid>
		<description><![CDATA[本文同步自（如浏览不正常请点击跳转）：https://zohead.com/archives/webhosting-gigawebhost/ 上次博客空间提供商突然被 GFW 封了一天，想着用这临时的免费主机不太保险，准备随便买个国外空间试试的，发现了这个 GigaWebHost，结果各种经历不吐不快，这空间主页： http://gigawebhost.com/ 看空间主页介绍的似乎很不错的，Features 里写的 30G 空间，似乎无流量限制，3万个子域名，PHP/MySQL/Zend 等都支持，最主要还支持我比较看重的 SSH Shell 功能，而且只要 1欧元 1个月，算起来一年也就  [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>本文同步自（如浏览不正常请点击跳转）：<a href="https://zohead.com/archives/webhosting-gigawebhost/" target="_blank">https://zohead.com/archives/webhosting-gigawebhost/</a></p>
<p>上次博客空间提供商突然被 GFW 封了一天，想着用这临时的免费主机不太保险，准备随便买个国外空间试试的，发现了这个 GigaWebHost，结果各种经历不吐不快，这空间主页：</p>
<p><a href="http://gigawebhost.com/" target="_blank">http://gigawebhost.com/</a></p>
<p>看空间主页介绍的似乎很不错的，Features 里写的 30G 空间，似乎无流量限制，3万个子域名，PHP/MySQL/Zend 等都支持，最主要还支持我比较看重的 SSH Shell 功能，而且只要 1欧元 1个月，算起来一年也就 100 RMB，相当划算，就在主页上点了个申请试用，结果这坑爹的所谓两小时试用还必须付款才可以，崩溃ing。后来看这空间似乎是个德国主机，德国主机一向质量还不错，就准备顺便买一个月（这个主机是月付）看看，结果在选域名那发现悲催了，只能选免费的二级域名，使用已有的域名要 30~50欧，还是每年，而主机本身一年才 12欧，FAKE，这简直是。。。 -_-#</p>
<p>好吧，都到这份上，先搞个免费的二级域名看看速度再说吧，然后试试在 CPanel 里 park domain 看看吧，用信用卡付款开通之后进 CPanel，悲剧了，默认的 CPanel 英语管理界面被 “智能” 滴翻译成了阿拉伯语，再汗。切成英语之后，死活找不到 park domain 的地方，oops，我认了，先看看 SSH 咋登录，准备把博客程序通过 SFTP 压缩上传上去再解压，这样备份和恢复网站内容是必须方便的哇。</p>
<p>结果在 SSH Shell 面板，再次吐血，默认 SSH Shell 不开通（FAKE，你 Features list 里写它干啥。。。），提示必须联系客户开通。好吧，我还是有耐性的，大不了联系客户呗，找到 submit ticket，用英文写了一段需求说我为什么要开通 SSH，顺便小问了下能不能帮开通下 park domain（因为这个对 CPanel 来说是非常简单的），提交 ticket。</p>
<p>然后开始等的过程，然后，然后，然后，就等了一个星期，德国人终于回 ticket 了，说开通 SSH 必须提交护照副本（我去，还护照副本，也不看我从哪来的。。。），而关于 park domain 则只字未提，我当即在 ticket 里回复：没有护照副本，park domain 能否开通？然后又是等待，5 天都没回，好吧，折腾不起了，果断取消空间和后续付费，还好也就花了首期的 1欧元，取消原因填上：never wanna use it again, never ~~~~</p>
<p>结束语：烂空间伤不起，各种选择主机请务必谨慎，作为前车之鉴咯~~~</p>
]]></content:encoded>
			<wfw:commentRss>https://zohead.com/archives/webhosting-gigawebhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
