<?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>程式設計 遇上 小提琴 &#187; WebFaction</title>
	<atom:link href="http://blog.ez2learn.com/tag/webfaction/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ez2learn.com</link>
	<description>Victor&#039;s個人部落格，關於程式設計與小提琴</description>
	<lastBuildDate>Tue, 07 Feb 2012 03:26:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Autostart script for TurboGears2</title>
		<link>http://blog.ez2learn.com/2009/09/20/autostart-script-for-turbogears2/</link>
		<comments>http://blog.ez2learn.com/2009/09/20/autostart-script-for-turbogears2/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 05:16:44 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[網站]]></category>
		<category><![CDATA[English Articles]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Autostart]]></category>
		<category><![CDATA[Pylons]]></category>
		<category><![CDATA[TurboGears2]]></category>
		<category><![CDATA[WebFaction]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=785</guid>
		<description><![CDATA[A autostart script for TurboGears2 and Pylons <a href="http://blog.ez2learn.com/2009/09/20/autostart-script-for-turbogears2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I complete a TurboGears2 application, I got a problem, how to keep my tg2 application always running on <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a>? You know, there is scheduled downtime of virtul host. Therefore, if you just run "paster serve &#8211;daemon production.ini", once the machine down, your application is down, too. So you have to find a way to keep your tg2 application up. I can use crontab to check tg2 application every 5 minutes, but during the just-start-up 5 minutes, your application is not working, so it is not a good idea. I notice <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a> use a autostart CGI script for TurboGears1 application. So I decide to use that autostart CGI script to run my tg2 application. You might ask, what is autostart and how it works? Autostart script is a simple script to keep your web application up. It is executed when mod_rewrite of apache can&#8217;t connect to your server. By using autostart script, the application runs on-demand! If there are no users browse your application, it&#8217;s no need to run your application, that saves your memory usage.</p>
<p>However, the autostart <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a> provided is  for tg1, so I modify it for tg2, here is the modified version of autostart:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&lt;!</span><span style="color: black;">&#91;</span>CDATA<span style="color: black;">&#91;</span>
<span style="color: #808080; font-style: italic;">#!/bin/env python2.4</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Test if the process is already running</span>
running = <span style="color: #008000;">False</span>
<span style="color: #808080; font-style: italic;"># read status of tg2 application</span>
lines = <span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>
    <span style="color: #483d8b;">'source /home/victorlin/webapps/tiange/tg2env/bin/activate;'</span>
    <span style="color: #483d8b;">'cd /home/victorlin/webapps/tiange/tiange/tiange;'</span>
    <span style="color: #483d8b;">'paster serve  status production.ini'</span><span style="color: black;">&#41;</span>.<span style="color: black;">readlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
line = lines<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
<span style="color: #ff7700;font-weight:bold;">if</span> line.<span style="color: black;">startswith</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Server running in PID'</span><span style="color: black;">&#41;</span>:
    running = <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Content-type: text/html<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
<span style="color: #ff7700;font-weight:bold;">if</span> running:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;&quot;&quot;&lt;head&gt;&lt;META HTTP-EQUIV=&quot;Refresh&quot; CONTENT=&quot;2; URL=.&quot;&gt;&lt;/head&gt;&lt;body&gt;
    Site is starting ...&lt;a href=&quot;.&quot; mce_href=&quot;.&quot;&gt;click here&lt;a&gt;&lt;/body&gt;&quot;&quot;&quot;</span>
<span style="color: #ff7700;font-weight:bold;">else</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;&quot;&quot;&lt;head&gt;&lt;META HTTP-EQUIV=&quot;Refresh&quot; CONTENT=&quot;2; URL=.&quot;&gt;&lt;/head&gt;&lt;body&gt;
    Restarting site ...&lt;a href=&quot;.&quot; mce_href=&quot;.&quot;&gt;click here&lt;a&gt;&lt;/body&gt;&quot;&quot;&quot;</span>
    <span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span>
        <span style="color: #483d8b;">'source /home/victorlin/webapps/tiange/tg2env/bin/activate;'</span>
        <span style="color: #483d8b;">'cd /home/victorlin/webapps/tiange/tiange/tiange;'</span>
        <span style="color: #483d8b;">'paster serve  daemon production.ini'</span><span style="color: black;">&#41;</span>
<span style="color: black;">&#93;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">&gt;</span></pre></div></div>

<p><a><br />
By the way, you can also use this script for Pylons applications. I hope this simple autostart script would be helpful :D</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2009/09/20/autostart-script-for-turbogears2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My review of Webfaction</title>
		<link>http://blog.ez2learn.com/2009/09/17/my-review-of-webfaction/</link>
		<comments>http://blog.ez2learn.com/2009/09/17/my-review-of-webfaction/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 04:58:27 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[English Articles]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Virtual host]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[WebFaction]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=752</guid>
		<description><![CDATA[experience of using webfaction virtual hosting service <a href="http://blog.ez2learn.com/2009/09/17/my-review-of-webfaction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One year has past since I bought <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a>&#8216;s virtual hosting service. Today, I want to share my experience.</p>
<h2>Webfaction&#8217;s virtual hosting is more than virtual hosting</h2>
<p>What does it mean "virtual hosting is more than virtual hosting"? Well, normaly, people think virtual hostings are all like that, upload your application by ftp, there is only few types of web application you can run, might be php, asp or some out-of-date web stuff. And you configure your site with control panel like cPanel or whatever, and that&#8217;s all what you can do with your host, pretty little isn&#8217;t it? You buy the service, but they limit what you can do.</p>
<p><a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a>, they give you full access to your SSH account, you can do almost everything you like with that. You can install whatever you like in your home directory, but indeed, they already installed most of popular tools for you.</p>
<div id="attachment_28" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/09/2008-09-28_233501.png"><img class="size-medium wp-image-28" title="遠端登入WebFaction帳號" src="http://blog.ez2learn.com/wp-content/uploads/2008/09/2008-09-28_233501-300x188.png" alt="遠端登入WebFaction帳號" width="300" height="188" /></a><p class="wp-caption-text">login to WebFaction&#39;s SSH account</p></div>
<p>For example, you can compile and install software you like in your home directory, You can even compile a server wrote in c language and run it on <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a>! I wrote an article to demonstrate how. You can read the article here: <a href="http://blog.ez2learn.com/tag/webfaction/">WebFaction能不能跑自己的C/C++語言Server?</a> (it is in traditional chinese)</p>
<div id="attachment_698" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_app.png"><img class="size-medium wp-image-698" title="custom_app" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_app-300x198.png" alt="custom_app" width="300" height="198" /></a><p class="wp-caption-text">Create a custom application by Webfaction&#39;s panel</p></div>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_port.png"><img class="alignnone size-medium wp-image-699" title="custom_port" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_port-300x198.png" alt="custom_port" width="300" height="198" /></a></p>
<div id="attachment_700" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/compile_app.png"><img class="size-medium wp-image-700" title="compile_app" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/compile_app-300x188.png" alt="compile_app" width="300" height="188" /></a><p class="wp-caption-text">Compile and run the c-server</p></div>
<div id="attachment_701" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/connect.png"><img class="size-medium wp-image-701" title="connect" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/connect-300x159.png" alt="connect" width="300" height="159" /></a><p class="wp-caption-text">That&#39;s it!</p></div>
<p>Another example, as I said, it is more than virtual hosting, actually, that also means it is more than web hosting. What if you want to run a non-http server? You have to buy a VPS, right? No! You can use <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a> virtual hosting to run your non-http server! I wrote a little chat room server for my Andriod chat room client, and it runs well on Webfaction! (It is not running now, because I have no time to maintain, and there is lots of problem in my client, it consume lots of cpu even it is running in background, I did&#8217;t handle the life cycle event well, so I just stop running it, until I got time to update)</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/npc2.png"><img class="alignnone size-medium wp-image-682" title="Dragon" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/npc2-300x200.png" alt="Dragon" width="300" height="200" /></a></p>
<p>Also, full access to SSH brings much more convenience to deal with your web applications. For example, it is a big trouble to deploy your web application by uploading all stuff by FTP. You have to remeber what pages are changed, and upload them manually, it is killing me. With <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a>, I use SVN to deploy my web application. I do develop web application on my machine, then, I check out my web application on Webfaction, and everything is there! If you just modified some pages of you site, you can commit them and run "svn update" on your application directory, and that&#8217;s it! Well, if you don&#8217;t like svn, you have your choice! You can install git, or if you like mercurial more than git, you can install them, too.</p>
<div id="attachment_306" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/11/svn.png"><img class="size-medium wp-image-306" title="在WebFaction主機遠端執行svn update" src="http://blog.ez2learn.com/wp-content/uploads/2008/11/svn-300x188.png" alt="在WebFaction主機遠端執行svn update" width="300" height="188" /></a><p class="wp-caption-text">run svn update in my application&#39;s folder</p></div>
<h2>Easy to use panel, install most popular web applications in few minutes</h2>
<p>What if you don&#8217;t know anything about linux commands, SSH or those geek&#8217;s stuff? Well, actually, Webfaction give you extra right by allowing you accessing SSH. But if you don&#8217;t know how to use SSH, that&#8217;s okay, you can use their powerful and easy-to-use control panel to install most of poplular web application without typing any lines of command, just fill the form, and click, then everything is there.</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/09/webfaction_panel.png"><img class="alignnone size-medium wp-image-760" title="webfaction_panel" src="http://blog.ez2learn.com/wp-content/uploads/2009/09/webfaction_panel-300x227.png" alt="webfaction_panel" width="300" height="227" /></a></p>
<p>There is so many popular applications that you can install with their control panel, e.g. wordpress, django, turbogears, trac, joomla, ruby on rails, subversion&#8230; and etc.  They use a simple but powerful architecture to let you configure your websites.</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/09/webfaction_architecture1.png"><img class="alignnone size-medium wp-image-762" title="webfaction_architecture" src="http://blog.ez2learn.com/wp-content/uploads/2009/09/webfaction_architecture1-300x172.png" alt="webfaction_architecture" width="300" height="172" /></a></p>
<p>As you can see in this figure, you mount domain names to application, that is, a website. It is pretty easy to use once you knows how it works.</p>
<h2>Friendly customer support</h2>
<p><a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a> provide the best customer supporting I have never seen. When I encounter problems, they always give me good answers, they are willing to help you out. That makes me feel happy, they do care about how customers feel.  Also, they know much about <span>technique</span>s, although they provide so many cool new stuff, they still know technical details about those stuff, and they can help you out with their sophisticated experience. Their nice customer supporting never let me feel regret to recommand.</p>
<h2>It&#8217;s balance between convenience, freedom and price</h2>
<p>You might ask, why I don&#8217;t just buy a VPS? Well, that&#8217;s obvious. First, I have not time to manage a VPS, it is not a happy job to upgrade your server, monitor it all the time. It is annoying to receive a database down warning message when you are sleeping. All I  want is to run my sites, why I have to take care about so much details? Second, as you see, I got some new stuff to run, like TurboGears2, I also got some non-http servers to run, why I have to buy a VPS just because some new stuff or non-http server? Finally, the price is the matter, it&#8217;s not cheap  to buy a good VPS. So the conclusion is, <a href="http://www.webfaction.com/?affiliate=victorlin">Webfaction</a> is the balance between convenience, freedom and price. That&#8217;s why I choice it.</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/09/webfaction_conclusion.png"><img class="alignnone size-medium wp-image-765" title="webfaction_conclusion" src="http://blog.ez2learn.com/wp-content/uploads/2009/09/webfaction_conclusion-300x175.png" alt="webfaction_conclusion" width="300" height="175" /></a></p>
<h2>Finally</h2>
<p>Finally, if you&#8217;re interested in <a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a>&#8216;s hosting service, you can just try it, they do provide 60-days money back guarantee, so you can get the money back if you don&#8217;t like it for any reason. And when you&#8217;re filling the signup form, you can fill my account "victorlin" in the "Promo code or referrer" field. I will be appreciate.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 152px; width: 1px; height: 1px;">
<h1>WebFaction能不能跑自己的C/C++語言Server?</h1>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2009/09/17/my-review-of-webfaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebFaction能不能跑自己的C/C++語言Server?</title>
		<link>http://blog.ez2learn.com/2009/07/30/run-self-compiled-c-cpp-server-on-webfaction/</link>
		<comments>http://blog.ez2learn.com/2009/07/30/run-self-compiled-c-cpp-server-on-webfaction/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 13:11:34 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[中文文章]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[主機商]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[自行編譯]]></category>
		<category><![CDATA[虛擬主機]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Virtual host]]></category>
		<category><![CDATA[WebFaction]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=697</guid>
		<description><![CDATA[介紹如何在WebFaction虛擬主機下跑自行編譯的C/C++ Server <a href="http://blog.ez2learn.com/2009/07/30/run-self-compiled-c-cpp-server-on-webfaction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>我之前寫了這篇<a href="http://blog.ez2learn.com/2009/07/19/webfaction-plans/">WebFaction不止是虛擬主機</a>的介紹，介紹關於<a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a>雖然是虛擬主機，但是他能做得比虛擬主機多太多了，價格實惠，功能強大，有人問<a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a>能不能跑自己的C/C++語言寫的Server，<strong>答案是當然可以</strong>，這點有明確地列在他們開出來的規格裡，為了示範如何做以及證明的確可以，我把我之前修網路程式設計寫的無聊Server丟上去編譯並執行給大家看</p>
<p><span id="more-697"></span></p>
<p>首先是伺服器的部份，因為只是作業，我寫的是一個很無聊的伺服器，client會丟一個數字n過來，而server會計算出這個數字在費伯那契數列中的第n個數然後回傳，只是為了示範，所以只以簡單為主，以下為程式碼片段:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #000080;">&lt;</span><span style="color: #000040;">!</span><span style="color: #008000;">&#91;</span>CDATA<span style="color: #008000;">&#91;</span>
<span style="color: #339900;">#include &quot;tcp_socket.h&quot;</span>
&nbsp;
<span style="color: #ff0000; font-style: italic;">/**
    @brief Handle incoming request
    @param [in] Socket to handle
**/</span>
<span style="color: #0000ff;">void</span> handleRequest<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> s<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
    string request <span style="color: #000080;">=</span> readString<span style="color: #008000;">&#40;</span>s<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #666666;">// remove \n</span>
    request <span style="color: #000080;">=</span> request.<span style="color: #007788;">substr</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span>, request.<span style="color: #007788;">size</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    stringstream stream<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">size_t</span> n<span style="color: #008080;">;</span>
    stream <span style="color: #000080;">&lt;&lt;</span> request<span style="color: #008080;">;</span>
    stream <span style="color: #000080;">&gt;&gt;</span> n<span style="color: #008080;">;</span>
    <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Receved request : &quot;</span> <span style="color: #000080;">&lt;&lt;</span> n <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
&nbsp;
    <span style="color: #0000ff;">size_t</span> i<span style="color: #008080;">;</span>
    <span style="color: #0000ff;">int</span> a <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">int</span> b <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> n<span style="color: #008080;">;</span> <span style="color: #000040;">++</span>i<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
        <span style="color: #0000ff;">int</span> temp <span style="color: #000080;">=</span> a <span style="color: #000040;">+</span> b<span style="color: #008080;">;</span>
        a <span style="color: #000080;">=</span> b<span style="color: #008080;">;</span>
        b <span style="color: #000080;">=</span> temp<span style="color: #008080;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #008000;">&#123;</span>
        stringstream stream<span style="color: #008080;">;</span>
        stream <span style="color: #000080;">&lt;&lt;</span> b<span style="color: #008080;">;</span>
        writeString<span style="color: #008000;">&#40;</span>s, stream.<span style="color: #007788;">str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> <span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>argv<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">try</span> <span style="color: #008000;">&#123;</span>
        <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>argc <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">3</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
            <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;usage: fib interface port&quot;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
            <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
        <span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">const</span> string interface <span style="color: #000080;">=</span> argv<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
        <span style="color: #666666;">// get port</span>
        <span style="color: #0000ff;">int</span> port<span style="color: #008080;">;</span>
        stringstream str<span style="color: #008080;">;</span>
        str <span style="color: #000080;">&lt;&lt;</span> argv<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
        str <span style="color: #000080;">&gt;&gt;</span> port<span style="color: #008080;">;</span>
&nbsp;
        <span style="color: #666666;">// listen</span>
        <span style="color: #0000ff;">int</span> s <span style="color: #000080;">=</span> listenTCP<span style="color: #008000;">&#40;</span>port, <span style="color: #0000dd;">5</span>, interface<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Listing on &quot;</span> <span style="color: #000080;">&lt;&lt;</span> interface <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;:&quot;</span> <span style="color: #000080;">&lt;&lt;</span> port <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot; ...&quot;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
        <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #008080;">;;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
            <span style="color: #666666;">// accept</span>
            sockaddr_in addr<span style="color: #008080;">;</span>
            <span style="color: #0000ff;">size_t</span> len <span style="color: #000080;">=</span> <span style="color: #0000dd;">sizeof</span><span style="color: #008000;">&#40;</span>addr<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
            <span style="color: #0000ff;">int</span> client <span style="color: #000080;">=</span> accept<span style="color: #008000;">&#40;</span>s, <span style="color: #0000ff;">reinterpret_cast</span><span style="color: #000080;">&lt;</span>sockaddr <span style="color: #000040;">*</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">&amp;</span>addr<span style="color: #008000;">&#41;</span>, <span style="color: #000040;">&amp;</span>len<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
            <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>client <span style="color: #000080;">==</span> <span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
                THROW<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
            <span style="color: #008000;">&#125;</span>
            <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;A connection from &quot;</span> <span style="color: #000080;">&lt;&lt;</span> ipAsString<span style="color: #008000;">&#40;</span>addr.<span style="color: #007788;">sin_addr</span>.<span style="color: #007788;">s_addr</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
            handleRequest<span style="color: #008000;">&#40;</span>client<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
            <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Close connection&quot;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
            close<span style="color: #008000;">&#40;</span>client<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span> <span style="color: #0000ff;">catch</span><span style="color: #008000;">&#40;</span>SocketError <span style="color: #000040;">&amp;</span>e<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
        e.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #008000;">&#125;</span>
    <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&gt;</span></pre></div></div>

<p>有了程式碼之後，我們要如何把它丟到<a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a>上面跑呢? 這部份比較討人厭，我個人不是很喜歡在unix-like的環境下開發C/C++程式，因為實在太麻煩了，各家OS的header都不盡相同，文件也七零八落，不知道去哪裡找，不像M$雖然邪惡，可是他的MSDN就在那裡，也只有一份，比起來要跨平台Python方便多了，寫一次到處跑，還好這作業原本就是在unix-like下跑的，所以只差了errno的link問題，解決後就可以編譯了</p>
<p>首先，我們需要從<a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a>的control panel中開一個custom app，也就是自訂的Server，因為port如果都任憑大家亂開，撞port號碼是個很大的問題，因此<a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a>的port是交給他們統一分配的，如下圖所示，操作面版就可以建立一個custom app</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_app.png"><img class="alignnone size-medium wp-image-698" title="custom_app" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_app-300x198.png" alt="custom_app" width="300" height="198" /></a></p>
<p>如你所見列表裡還有一堆其它程式可以透過這樣自動建成，不過我們今天重點不在那裡，而在自製的server，所以那些部份留在改天再介紹</p>
<p>這個步驟他會在你的home/webapps/下建立一個c_server_demo的資料夾，基本上，WebFaction的所有自動生程的程式都會在webapps下建立相對應的資料夾，而該安裝的檔案也會放在裡面，因為我們建立的是custom app，所以裡面是空的，不果我們還是照慣例，把我們的server程式碼丟進去，而在建立完c_server_demo之後，除了他會自動建立資料夾外，他還會分配一個port給你</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_port.png"><img class="alignnone size-medium wp-image-699" title="custom_port" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/custom_port-300x198.png" alt="custom_port" width="300" height="198" /></a></p>
<p>有了這個port，稍後我們的server就可以開在這個port上面，我們先進行編譯的工作，編譯完成後就可以執行我們的server，把它綁在我們想要的ip以及port上</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/compile_app.png"><img class="alignnone size-medium wp-image-700" title="compile_app" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/compile_app-300x188.png" alt="compile_app" width="300" height="188" /></a></p>
<p>接著，server上線了，就可以來試著連線看看</p>
<p><a href="http://blog.ez2learn.com/wp-content/uploads/2009/07/connect.png"><img class="alignnone size-medium wp-image-701" title="connect" src="http://blog.ez2learn.com/wp-content/uploads/2009/07/connect-300x159.png" alt="connect" width="300" height="159" /></a></p>
<p><strong>成功了，就是這麼簡單</strong>，啥? 你說為什麼會有怪怪的數字? 因為server本來設計是接受binrary的整數，telnet丟字串給他當然會出問題，以上就是對於<a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a>跑自行編譯Server的示範，因為有60天無條件退款，所以有興趣的朋友們別客氣申請來試試看，可以的話推薦人請填victorlin，或是從部落格的文章連結進入申請，<strong>還有其它問題的話可以問我，或是我幫各位問他們的客服</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2009/07/30/run-self-compiled-c-cpp-server-on-webfaction/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebFaction價目表中文版，再一次推薦WebFaction</title>
		<link>http://blog.ez2learn.com/2009/07/19/webfaction-plans/</link>
		<comments>http://blog.ez2learn.com/2009/07/19/webfaction-plans/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 04:59:57 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[中文文章]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[主機商]]></category>
		<category><![CDATA[虛擬空間]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[WebFaction]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=685</guid>
		<description><![CDATA[介紹WebFaction優秀的主機商，提供使用者完整的自主權，可以執行任何程式，包括自己寫的伺服器等等 <a href="http://blog.ez2learn.com/2009/07/19/webfaction-plans/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>最近因為要向客戶報價，使用的空間當然也要讓客戶知道，客戶原本案主要用的空間是貴到暴炸的國內空間，每年要價一萬多元，流量和空間更是小得可憐，拿國內和國外比當然是不能比，為了讓客戶瞭解差別在哪裡，所以就翻譯了一份WebFaction的Plans</p>
<p>下列資訊以<a href="http://www.webfaction.com/services/hosting?affiliate=victorlin">原網頁</a>內容為主，價錢單位為美金</p>
<p><span id="more-685"></span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="111" valign="top"><strong>類型</strong></td>
<td width="111" valign="top"><strong>分享型1</strong></td>
<td width="112" valign="top"><strong>分享型2</strong></td>
<td width="112" valign="top"><strong>分享型3</strong></td>
<td width="112" valign="top"><strong>分享型4</strong></td>
</tr>
<tr>
<td width="111" valign="top"><strong>付五年款</strong></td>
<td width="111" valign="top">$5.50/每月</td>
<td width="112" valign="top">$8.50/每月</td>
<td width="112" valign="top">$16.50/每月</td>
<td width="112" valign="top">$24.50/每月</td>
</tr>
<tr>
<td width="111" valign="top"><strong>付三年款</strong></td>
<td width="111" valign="top">$6.50/每月</td>
<td width="112" valign="top">$10.00/每月</td>
<td width="112" valign="top">$18.50/每月</td>
<td width="112" valign="top">$27.00/每月</td>
</tr>
<tr>
<td width="111" valign="top"><strong>付兩年款</strong></td>
<td width="111" valign="top">$7.50/每月</td>
<td width="112" valign="top">$11.50/每月</td>
<td width="112" valign="top">$20.50/每月</td>
<td width="112" valign="top">$29.50/每月</td>
</tr>
<tr>
<td width="111" valign="top"><strong>付一年款</strong></td>
<td width="111" valign="top">$8.50/每月</td>
<td width="112" valign="top">$13.00/每月</td>
<td width="112" valign="top">$22.50/每月</td>
<td width="112" valign="top">$32.00/每月</td>
</tr>
<tr>
<td width="111" valign="top"><strong>每月付款</strong></td>
<td width="111" valign="top">$9.50/每月</td>
<td width="112" valign="top">$14.50/每月</td>
<td width="112" valign="top">$24.50/每月</td>
<td width="112" valign="top">$34.50/每月</td>
</tr>
<tr>
<td width="111" valign="top"><strong>設定費用</strong></td>
<td width="111" valign="top">免費</td>
<td width="112" valign="top">免費</td>
<td width="112" valign="top">免費</td>
<td width="112" valign="top">免費</td>
</tr>
<tr>
<td width="111" valign="top"><strong>60</strong><strong>天退費保證</strong></td>
<td width="111" valign="top">有</td>
<td width="112" valign="top">有</td>
<td width="112" valign="top">有</td>
<td width="112" valign="top">有</td>
</tr>
<tr>
<td width="111" valign="top"><strong>硬碟空間</strong></td>
<td width="111" valign="top">10GB</td>
<td width="112" valign="top">20GB</td>
<td width="112" valign="top">40GB</td>
<td width="112" valign="top">60GB</td>
</tr>
<tr>
<td width="111" valign="top"><strong>每月頻寬</strong></td>
<td width="111" valign="top">600GB</td>
<td width="112" valign="top">1200GB</td>
<td width="112" valign="top">1800GB</td>
<td width="112" valign="top">2400GB</td>
</tr>
<tr>
<td width="111" valign="top"><strong>可用記憶體</strong></td>
<td width="111" valign="top">80MB</td>
<td width="112" valign="top">120MB</td>
<td width="112" valign="top">160MB</td>
<td width="112" valign="top">200MB</td>
</tr>
<tr>
<td colspan="5" width="558" valign="top"><strong>網站</strong></td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>可架設網站數量</strong></td>
<td colspan="3" width="335" valign="top">無限</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>SSL(https) </strong><strong>支援 (</strong><strong>安全連線)</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>每日使用率統計</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>DNS</strong><strong>完全控制</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="5" width="558" valign="top"><strong>Email</strong></td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>Email </strong><strong>數量</strong></td>
<td colspan="3" width="335" valign="top">無限</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>信箱</strong></td>
<td colspan="3" width="335" valign="top">無限</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>SMTP, POP </strong><strong>和 IMAP </strong><strong>安全存取</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>網頁郵件安全存取</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>郵件列表</strong></td>
<td colspan="3" width="335" valign="top">無限</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>強力垃圾郵件過慮</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>自動回覆以及伺服器端規則</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="5" width="558" valign="top"><strong>資料庫</strong></td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>資料庫數量</strong></td>
<td colspan="3" width="335" valign="top">無限</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>MySQL</strong><strong>支援</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>PostgreSQL </strong><strong>支援</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="5" width="558" valign="top"><strong>Shell</strong></td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>完整的 shell </strong><strong>存取，包括SSH </strong><strong>以及 SFTP</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>可跑長期執行之程式，例如Rails</strong><strong>、Django</strong><strong>、其它</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>額外的SSH</strong><strong>及SFTP</strong><strong>使用者</strong></td>
<td colspan="3" width="335" valign="top">無限</td>
</tr>
<tr>
<td colspan="5" width="558" valign="top"><strong>備份</strong></td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>每天遠端完整地備份你所的資料</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="5" width="558" valign="top"><strong>軟體</strong></td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>單鍵安裝多種應用程式，包括Rails</strong><strong>、Django</strong><strong>、Drupal</strong><strong>、WordPress</strong><strong>還有其它很多</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>安全的Linux</strong><strong>系統包含上千個預先安裝好的工具</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>Apache</strong><strong>架設PHP</strong><strong>，包含SSI</strong><strong>、.httpaccess</strong><strong>檔案</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>可以執行任何用PHP</strong><strong>、Python</strong><strong>、Ruby</strong><strong>、Perl</strong><strong>或Java</strong><strong>配合MySQL</strong><strong>、Postgresql</strong><strong>或sqlite</strong><strong>之程式</strong></td>
<td colspan="3" width="335" valign="top">有</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>可以編譯及安裝任何你需要的軟體在HOME</strong><strong>資料夾</strong></td>
<td colspan="3" width="335" valign="top">可</td>
</tr>
<tr>
<td colspan="5" width="558" valign="top"><strong>額外</strong></td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>額外的硬碟空間</strong></td>
<td colspan="3" width="335" valign="top">+$5/每月4GB</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>額外的頻寬</strong></td>
<td colspan="3" width="335" valign="top">+$5/每月200GB</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>額外的記憶體</strong></td>
<td colspan="3" width="335" valign="top">+$7/每月 40MB</td>
</tr>
<tr>
<td colspan="2" width="223" valign="top"><strong>私人IP</strong></td>
<td colspan="3" width="335" valign="top">+$5 每月</td>
</tr>
</tbody>
</table>
<h2>WebFaction不止是虛擬主機，他給你完整的自主權</h2>
<p>起初我也以為WebFaction就一般的虛擬主機，跑跑網頁程式這樣，我一直很困擾有一些自己寫的非網頁Server要跑，租實體主機又很太貴了，如果有虛擬主機可以跑我自己寫的Server就好了，後來我才發現，原來<strong>WebFaction也可以跑自己寫的Server</strong>，所以我的<a href="http://blog.ez2learn.com/2009/07/15/dream-on-line-chat-roo/">夢想線上聊天室</a>的伺服器，是我自己用Python + Twisted寫的，就是擺在WebFaction上，因為他開放完整的linux用戶可以使用，所以你可以先在他的控制面版建立一個custom server，它會幫你開一個port，接著只要你的Server port設成他分配的那個，接著用crontab來定期檢查你的server，確定他都有在線上就可以了，而且這個部份我不太懂，寫給客服他們一樣跟我說明要怎麼做，除了自訂的伺服器，<strong>WebFaction一樣可以開SVN等等的服務</strong>，可以參考<a href="http://blog.ez2learn.com/2008/11/03/develop-website-with-svn/">這篇</a>，而且沒限制可以開多少個，唯一數量上的限制是長時間執行的程式加總起來的記憶體用量，像是Rails、Django、TurboGears這類的程式，如果不是的話，<strong>像PHP之類的網站，要架多少都可以</strong>，只要空間和流量夠用，問題是要把那樣的流量和空間用完是非常困難的事，我自己在上面就不知道放了多少東西，感覺真的物超所值，目前我需要跑的還沒遇過跑不了的，除了我說的這些，其它在列表裡提到的都是很棒的特點，不止是可以跑script語言的程式，你要自行編譯程式也是可以的</p>
<h2>不懂Linux之類的鬼東西也能用嗎</h2>
<p>很多人可能擔心不懂Linux之類的什麼鬼東西到底怎麼用，其實那一點都沒關係，因為WebFaction有提供強大的控制面版功能，內建各種流行的程式，只要點點按鍵，他就會自動幫你生成整個網站，像是這個部落格wordpress，就是透過它的控制面版生成的，剩的就只是較細節上的修改，像是樣版和安裝外掛，這都可以透過Wordpress介面很簡單就可以辦得到，而除了Wordpress，其它常見的流行程式他們都有支援，像是Joomla、Drupal之類的都可以透過它的控制面版單鍵架好，在這有<a href="http://www.webfaction.com/demos/control-panel?affiliate=victorlin">官方的影片來示範怎麼操作他們的控制面版</a>，像這類用PHP寫的東西你想要架幾個都可以，之前看到有部落格只是有獨立網域而以就要天價，真的是冤大頭，有自己的網域辦得到嗎? 當然可以，你要設定多少個都可以，一樣可以透過他們的控制面版設定好，半行指令都不用知道，同樣的價錢用WebFaction可以讓你架無限個獨立網域的部落格，只要流量和空間許可</p>
<h2>優秀的客服</h2>
<p>他們的客服真的是我見過最優秀的，如果你租的是台灣的主機，你可能遇過且發現和客服溝通是件很痛苦的事情，接起電話的可能是不知道哪裡請來的工讀小妹，一問三不知，寫信說你有要緊的事情請幫忙處理一下，結果信件石沉大海，但是WebFaction的客服不一樣，他們的客服團隊有優秀的技術背景，你在使用上遇到任何問題，只要問他們，他們都很樂意回答，而且也都答得出來，願意教你怎麼做，甚至可以幫你解決，可以參考我先前寫的<a href="http://blog.ez2learn.com/2008/09/28/hosting-of-this-site/">這篇文章</a></p>
<h2>使用了一年</h2>
<p>使用了將近一年，這家主機商從來沒有讓我失望過，而且也都能夠滿足我的需求，雖然我已經寫過很多文章推薦過這家主機商，過了一年我還是想再次推薦這家主機商，關於要如何申請，可以參考<a href="http://blog.ez2learn.com/2008/10/25/guide-to-buy-webfaction-service/">這篇文章</a>，或許你會覺得如果我是在嘴砲，沒有我說的這麼好但已經買了該怎麼辦，關於這點，<strong>他們有60天保證無條件退款</strong>，所以在試用60天以內，都可以把錢拿回來，而且換算成台幣，最初階的主機也只要每年三千多元，而且已經能滿足大部份人的需求，所以我真的很希望這樣優秀的主機商可以有更多人使用</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2009/07/19/webfaction-plans/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>用SVN來開發網站的經驗</title>
		<link>http://blog.ez2learn.com/2008/11/03/develop-website-with-svn/</link>
		<comments>http://blog.ez2learn.com/2008/11/03/develop-website-with-svn/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 10:35:27 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[中文文章]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[網站]]></category>
		<category><![CDATA[主機商]]></category>
		<category><![CDATA[網頁開發]]></category>
		<category><![CDATA[WebFaction]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=303</guid>
		<description><![CDATA[慘痛的經驗 相信很多人都有慘痛的經驗，當網站開發到了上線之後，就會發生很慘的事，每次更新完之後，就要挑出修改的檔案，送到虛擬主機上面，如果神經大條一點，剛才改了什麼忘記了，忘記上傳，你在線上的網站可能就因此漏掉什麼重要的東西，如果你傳了某個東西才發現這會出現一個嚴重的漏洞，想回復到先前的樣子，又東改西改，甚至直接修改伺服器上的版本，然而事後你卻忘記下載到你電腦上的版本，到最後所有東西都會一團糟，因為你有兩個版本要管理，一個是線上的版本，一個是你電腦中開發的版本，相信有開發網站經驗的人可能都碰過這樣的事情 閃開! 讓專業的來: SVN 是的，這時候就得靠專業的來，也就是用SVN來完成這些煩人的工作，我在前陣子想到這樣可以用這樣來讓後端開發的網頁和前端分開，又可以不用上傳，使用起來真的是非常順手，從先前開發其它網頁的經驗，到這次開發哇咧咧的經驗，都顯示這樣的工作方示真的是比起用手動更新上傳網頁來得好太多了，我的架構是這樣 在虛擬主機上開一份SVN 開發中網頁check out那份SVN 線上版本也check out那份SVN 當網頁改版 當網頁需要改版，就在自己電腦上修改，並且測試，隨時都可以commit，反正線上那份版本你不去update它也不會改變，等到確定這次改版沒問題了，在從伺服器那邊執行svn update 就是這樣簡單，如果發現剛剛更新的版本有問題，也只要將svn check out到先前沒問題的版本就ok了，完全不用手忙腳亂地手動管理你的網頁，比起自己記得改過什麼、上傳的方式，來得優雅、有效太多了 什麼? 你的主機商沒支援SVN!? 什麼!? 你說你的虛擬主機沒有支援SVN，不要說SVN，連ssh連線都沒有!? 那我也沒辦法 ..╮(﹋﹏﹌)╭.. 唯一的辦法就是換主機商，或是租實體主機，我有一些文章提到關於我的網站的主機商WebFaction，他們提供完整的環境和配置，而且只是虛擬主機而以，不用為了這樣的理由去租一台實體主機，有興趣可以參考看看。]]></description>
			<content:encoded><![CDATA[<h2>慘痛的經驗</h2>
<p>相信很多人都有慘痛的經驗，當網站開發到了上線之後，就會發生很慘的事，每次更新完之後，就要挑出修改的檔案，送到虛擬主機上面，如果神經大條一點，剛才改了什麼忘記了，忘記上傳，你在線上的網站可能就因此漏掉什麼重要的東西，如果你傳了某個東西才發現這會出現一個嚴重的漏洞，想回復到先前的樣子，又東改西改，甚至直接修改伺服器上的版本，然而事後你卻忘記下載到你電腦上的版本，到最後所有東西都會一團糟，因為你有兩個版本要管理，一個是線上的版本，一個是你電腦中開發的版本，相信有開發網站經驗的人可能都碰過這樣的事情</p>
<h2>閃開! 讓專業的來: SVN</h2>
<p><span id="more-303"></span></p>
<p>是的，這時候就得靠專業的來，也就是用SVN來完成這些煩人的工作，我在前陣子想到這樣可以用這樣來讓後端開發的網頁和前端分開，又可以不用上傳，使用起來真的是非常順手，從先前開發其它網頁的經驗，到這次開發<a href="http://walele.com">哇咧咧</a>的經驗，都顯示這樣的工作方示真的是比起用手動更新上傳網頁來得好太多了，我的架構是這樣</p>
<blockquote><p>在虛擬主機上開一份SVN<br />
開發中網頁check out那份SVN<br />
線上版本也check out那份SVN</p></blockquote>
<div id="attachment_307" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/11/windows_svn.png"><img class="size-medium wp-image-307" title="在本地端開發用的SVN check out版本" src="http://blog.ez2learn.com/wp-content/uploads/2008/11/windows_svn-300x243.png" alt="在本地端開發用的SVN check out版本" width="300" height="243" /></a><p class="wp-caption-text">在本地端開發用的SVN check out版本</p></div>
<h2>當網頁改版</h2>
<p>當網頁需要改版，就在自己電腦上修改，並且測試，隨時都可以commit，反正線上那份版本你不去update它也不會改變，等到確定這次改版沒問題了，在從伺服器那邊執行svn update</p>
<div id="attachment_306" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/11/svn.png"><img class="size-medium wp-image-306" title="在WebFaction主機遠端執行svn update" src="http://blog.ez2learn.com/wp-content/uploads/2008/11/svn-300x188.png" alt="在WebFaction主機遠端執行svn update" width="300" height="188" /></a><p class="wp-caption-text">在WebFaction主機遠端執行svn update</p></div>
<p>就是這樣簡單，如果發現剛剛更新的版本有問題，也只要將svn check out到先前沒問題的版本就ok了，完全不用手忙腳亂地手動管理你的網頁，比起自己記得改過什麼、上傳的方式，來得優雅、有效太多了</p>
<h2>什麼? 你的主機商沒支援SVN!?</h2>
<p>什麼!? 你說你的虛擬主機沒有支援SVN，不要說SVN，連ssh連線都沒有!? 那我也沒辦法 ..╮(﹋﹏﹌)╭..</p>
<p>唯一的辦法就是換主機商，或是租實體主機，我有一些<a href="http://blog.ez2learn.com/tag/%E4%B8%BB%E6%A9%9F%E5%95%86/">文章</a>提到關於我的網站的主機商<a href="http://www.webfaction.com/services/?affiliate=victorlin">WebFaction</a>，他們提供完整的環境和配置，而且只是虛擬主機而以，不用為了這樣的理由去租一台實體主機，有興趣可以參考看看。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2008/11/03/develop-website-with-svn/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>購買WebFaction網頁主機服務指導</title>
		<link>http://blog.ez2learn.com/2008/10/25/guide-to-buy-webfaction-service/</link>
		<comments>http://blog.ez2learn.com/2008/10/25/guide-to-buy-webfaction-service/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 07:44:54 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[中文文章]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[網站]]></category>
		<category><![CDATA[英文]]></category>
		<category><![CDATA[主機商]]></category>
		<category><![CDATA[WebFaction]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=243</guid>
		<description><![CDATA[比較國內和國外 每次說到國內和國外的主機商，我都想說"XX比雞腿"，真的是不能比，我們隨便找一家國內的知名主機商來和我這一系列ez2learn的網站所架在的主機商WebFaction比較看看 智邦生活館 WebFaction 智邦的年費要 1200 元新台幣 新台幣，我們來看WebFaction最低階的，五年約的主機，5.5美金每個月，一年就是66美金，以匯率以現在的33.3800654下去計算，一年是 2203 元台幣 重點在後面，我們來比比看同樣價格下有多少資源可以使用 智邦和WebFaction虛擬主機比較表 資源 智邦 WebFaction 最低價年費 1200 2203 硬碟空間 2GB 10GB 每月免費流量 10GB 600GB 價錢空間比 600 220.3 價錢流量比 120 3.67 很明顯地，怎麼算隨便一家國外的主機商都可以把國內的主機商打得死死的，怎麼比? 根本沒辦法比，而且除了這些可以數值化的價錢、資源可以比較，還有一些是沒辦法比較的，如同在我這個網站的主機商 : WebFaction中所提到的，他們有一個團隊的優秀客服，負責解決客戶在技術上遇到的問題，他們甚至建立了整個的知識庫來記錄這些問題，他們的客服都是很有經驗的，雖然我沒用過智邦，但另一家國內的主機商的客服來說，國內的主機商肯定辦不到找一群有經驗的客服來解決客戶遇到技術上的問題，這只是客服的部份，還有主機技術上的支援，不要說國內的主機，國外的主機都很少有支援Python、Ruby、TurboGears、Django等等國內較少見的網頁開發環境，國內有的就只有老掉牙的LAMP (Linux Apache MySQL PHP)，會選擇WebFaction是因為他們支援TurboGears，因為WebFaction注重在於支援那些開發環境和客服，所以就流量和空間等等的資源上，已經算是比較沒有那麼強，有很多主機商如果只支援LAMP那樣的網頁環境的話，資源的差距那更是天差地遠，總合以上幾點的結論是，真的是"XX比雞腿"，怎麼比? 沒辦法比，國外的主機商市場那麼大，國內這麼小，價格和服務當然沒辦法比 那PHP呢? &#8230; <a href="http://blog.ez2learn.com/2008/10/25/guide-to-buy-webfaction-service/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>比較國內和國外</h2>
<p>每次說到國內和國外的主機商，我都想說"XX比雞腿"，真的是不能比，我們隨便找一家國內的知名主機商來和我這一系列ez2learn的網站所架在的主機商WebFaction比較看看</p>
<p><a href="http://hosting.url.com.tw/products/">智邦生活館</a></p>
<p><a href="http://www.webfaction.com/services/?affiliate=victorlin">WebFaction</a></p>
<p>智邦的年費要</p>
<blockquote><p>1200 元新台幣</p></blockquote>
<p>新台幣，我們來看WebFaction最低階的，五年約的主機，5.5美金每個月，一年就是66美金，以匯率以現在的33.3800654下去計算，一年是</p>
<blockquote><p>2203 元台幣</p></blockquote>
<p>重點在後面，我們來比比看同樣價格下有多少資源可以使用</p>
<table border="0">
<caption>智邦和WebFaction虛擬主機比較表</caption>
<tbody>
<tr style="background-color: #c0c0c0;">
<td>資源</td>
<td>智邦</td>
<td>WebFaction</td>
</tr>
<tr>
<td>最低價年費</td>
<td>1200</td>
<td>2203</td>
</tr>
<tr style="background-color: #c0c0c0;">
<td>硬碟空間</td>
<td>2GB</td>
<td>10GB</td>
</tr>
<tr>
<td>每月免費流量</td>
<td>10GB</td>
<td>600GB</td>
</tr>
<tr style="background-color: #c0c0c0;">
<td>價錢空間比</td>
<td>600</td>
<td>220.3</td>
</tr>
<tr>
<td>價錢流量比</td>
<td>120</td>
<td>3.67</td>
</tr>
</tbody>
</table>
<p>很明顯地，怎麼算隨便一家國外的主機商都可以把國內的主機商打得死死的，怎麼比? 根本沒辦法比，而且除了這些可以數值化的價錢、資源可以比較，還有一些是沒辦法比較的，如同在我<a href="http://blog.ez2learn.com/2008/09/28/hosting-of-this-site/">這個網站的主機商 : WebFaction</a>中所提到的，他們有一個團隊的優秀客服，負責解決客戶在技術上遇到的問題，他們甚至建立了整個的知識庫來記錄這些問題，他們的客服都是很有經驗的，雖然我沒用過智邦，但另一家國內的主機商的客服來說，國內的主機商肯定辦不到找一群有經驗的客服來解決客戶遇到技術上的問題，這只是客服的部份，還有主機技術上的支援，不要說國內的主機，國外的主機都很少有支援Python、Ruby、TurboGears、Django等等國內較少見的網頁開發環境，國內有的就只有老掉牙的LAMP (Linux Apache MySQL PHP)，會選擇WebFaction是因為他們支援TurboGears，因為WebFaction注重在於支援那些開發環境和客服，所以就流量和空間等等的資源上，已經算是比較沒有那麼強，有很多主機商如果只支援LAMP那樣的網頁環境的話，資源的差距那更是天差地遠，總合以上幾點的結論是，真的是"XX比雞腿"，怎麼比? 沒辦法比，國外的主機商市場那麼大，國內這麼小，價格和服務當然沒辦法比</p>
<h2>那PHP呢?</h2>
<p>如果你要用WebFaction跑PHP也是可以，WebFaction上面寫的Memory限制，是針對Python等網頁程式，PHP目前是不在限制之類的，所以PHP的網站不用擔心記憶體使用超過限制的問題，</p>
<h2>那好幾個網站呢?</h2>
<p>那如果說，你想架好幾個網站呢? 對於WebFaction來說也沒問題，如你所見，我的ez2learn.com下面的所有網站</p>
<p><a href="http://ez2learn.com/">易記學程式設計教學</a></p>
<p><a title="我寫的Open source網頁抓取用的函式庫，用Python和基於Twisted以及lxml" href="http://webchuan.ez2learn.com/">WebChuan 網頁抓取函式庫</a></p>
<p><a title="程式設計社群討論區，各種程式語言的社群討論區" href="http://forum.ez2learn.com/">易記學 程式設計討論區</a></p>
<p>和這個部落格，全是架在同樣一個虛擬主機下，它的控制版面讓架站相當輕鬆容易，你要架多少個網站他沒有限制，只要流量和空間不超過限制就可以，就我網站目前那丁點流量和空間使用率，要超過限制實在很有難度，而且PHP的網站也不限記憶體使用率，所以事實上如果你拿來架PHP的話，可以弄一堆網站都沒問題</p>
<h2>唯一的問題 : 英文</h2>
<p>為什麼差這麼多，還是有人會買國內的主機服務，我想了想，答案大概就在於語言吧，畢竟不是每個人都懂得如何看懂英文網頁，和寫信用英文和客服溝通，事實上英文不用太好，只要看得懂，和寫出來對方看得懂就夠了，像我英文這樣破爛的人，都可以做得到，證明不是什麼難事，如果因為英文不好而花大錢當冤大頭不是很嘔嗎? 而且現在的主機商都有幾天內無條件退費的優惠，WebFaction的無條件退費天數是60天，也就是說你購買了服務之後，60天以內後悔了、覺得服務很爛、看客服不爽，各種理由，都可以無條件退費，以下我們指導如何購買WebFaction的虛擬主機服務</p>
<h2>如何購買WebFaction網頁主機服務</h2>
<p>首先，來到<a href="https://www.webfaction.com/signup/?affiliate=victorlin">WebFaction的申請頁面</a>，填寫你的基本資料</p>
<div id="attachment_255" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/10/2008-10-25_150403.png"><img class="size-medium wp-image-255" title="WebFaction填寫基本資料" src="http://blog.ez2learn.com/wp-content/uploads/2008/10/2008-10-25_150403-300x220.png" alt="WebFaction填寫基本資料" width="300" height="220" /></a><p class="wp-caption-text">WebFaction填寫基本資料</p></div>
<p>填寫你的姓名、信箱、地址、國家等等，關於地址，如果你不知道你所住的地方英文地址是什麼，沒關係，我也不知道，因為有線上<a href="http://www.post.gov.tw/post/internet/f_searchzone/index.jsp?ID=190103">中文地址轉英文地址</a>的服務可以使用，請注意範例中寫的地址不是我家的，是我看見下面中華郵政的地址就隨手寫進去轉成英文當示範用，其中還有公司和VAT欄位，如果沒有可以不要填</p>
<p>接下來是關於你的網站的資料</p>
<div id="attachment_258" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/10/site1.png"><img class="size-medium wp-image-258" title="WebFaction填寫網站資料" src="http://blog.ez2learn.com/wp-content/uploads/2008/10/site1-300x95.png" alt="WebFaction填寫網站資料" width="300" height="95" /></a><p class="wp-caption-text">WebFaction填寫網站資料</p></div>
<p>User name是你的使用者名稱，你以後登入WebFaction的管理版面或是SSH都是用這個名稱，不能更改</p>
<p>Domain是你的域名，如果暫時還沒有的話，可以留白，他會給你一個&lt;使用者名稱&gt;.webfactional.com的域名，當然，當之後你有域名以後就可以更改設定</p>
<p>Software是一開始他們要幫你安裝的軟體，當然，你可以自己用他們的控制面版安裝或修改，相當的簡單，照著他們<a href="http://www.webfaction.com/demos/django?affiliate=victorlin">教學影片</a>做，我只能說簡單到不行</p>
<p>If other: 如果你也想安裝其它軟體，一樣也可以寫在這裡，它們在開通帳戶時一樣會幫你安裝</p>
<p>Promo code or referer: 這裡是填寫推薦人，這裡是填寫我的id victorlin，這樣我可以得到一些回饋金:P</p>
<div id="attachment_261" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/10/plan1.png"><img class="size-medium wp-image-261" title="申請WebFaction填寫Plan" src="http://blog.ez2learn.com/wp-content/uploads/2008/10/plan1-300x60.png" alt="申請WebFaction填寫Plan" width="300" height="60" /></a><p class="wp-caption-text">申請WebFaction填寫Plan</p></div>
<p>接著是選擇你要使用哪一個Plan，也就是，什麼等級的虛擬主機，在這裡示範我們選擇Shared1，也就是最便宜的虛擬主機，當然，如果你有需要，可以選擇更高級的，甚至是專屬主機，有什麼主機類形可以看他們的網頁<a href="http://www.webfaction.com/services/hosting?affiliate=victorlin">這裡</a>有寫，專屬主機的話，則是寫在<a href="http://www.webfaction.com/services/dedicated?affiliate=victorlin">這裡</a>，然後是付款方式，可以選擇使用信用卡、金融卡或Paypal付款，在這裡我們選擇使用信用卡，Payment period是指多久付一次款，一次合約越久就越便宜，可以參照他們網頁上所寫的</p>
<div id="attachment_262" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/10/accept.png"><img class="size-medium wp-image-262" title="WebFaction申請接受條款" src="http://blog.ez2learn.com/wp-content/uploads/2008/10/accept-300x114.png" alt="WebFaction申請接受條款" width="300" height="114" /></a><p class="wp-caption-text">WebFaction申請接受條款</p></div>
<p>接著你可以在Comments or special instructions裡寫你想他們幫你做的要的額外工作，例如安裝某些套件等等，最後勾選TOS and AUP接受他們的條款，就可以Next step填寫信用卡資料，完成之後，需要等收到他們來信告知帳戶開通完成，不會等太久，當時幾小時我就收到信馬上可以使用了</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2008/10/25/guide-to-buy-webfaction-service/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>給WebFaction的回信</title>
		<link>http://blog.ez2learn.com/2008/10/02/response-for-webfactio/</link>
		<comments>http://blog.ez2learn.com/2008/10/02/response-for-webfactio/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 08:07:58 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[中文文章]]></category>
		<category><![CDATA[英文]]></category>
		<category><![CDATA[破爛英文]]></category>
		<category><![CDATA[WebFaction]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=52</guid>
		<description><![CDATA[破爛英文 雖然我的英文很爛，但是七拼八湊讓對方聽懂應該還可以，只是每次對方聽懂了，感覺好像也就沒事了，但是其實有很多錯字、錯用和不通順在裡面，如果不管或許會一直錯用下去，如果我記錄下來，在寫完之後重新看過，找出錯誤來，或許才是進步的好方法 劇情提要 XD 這次WebFaction的系統發信來告知記憶體超出使用限制，所以回應解釋我的解決方案 來信 Hello, Right now (2008-10-01 20:01:58 CDT) it appears that your processes on Web54 are using more memory than your plan allows. If you haven&#8217;t read it yet, we recommend that you have a look &#8230; <a href="http://blog.ez2learn.com/2008/10/02/response-for-webfactio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>破爛英文</h2>
<p>雖然我的英文很爛，但是七拼八湊讓對方聽懂應該還可以，只是每次對方聽懂了，感覺好像也就沒事了，但是其實有很多錯字、錯用和不通順在裡面，如果不管或許會一直錯用下去，如果我記錄下來，在寫完之後重新看過，找出錯誤來，或許才是進步的好方法</p>
<h2>劇情提要 XD</h2>
<p>這次WebFaction的系統發信來告知記憶體超出使用限制，所以回應解釋我的解決方案</p>
<p><span id="more-52"></span></p>
<h2>來信</h2>
<blockquote><p>Hello,</p>
<p>Right now (2008-10-01 20:01:58 CDT) it appears that your processes on Web54 are using more memory than your plan allows.</p>
<p>If you haven&#8217;t read it yet, we recommend that you have a look at our "Memory usage" article (http://blog.webfaction.com/memory-usage) for tips on how to keep your memory usage down.</p>
<p>Your total allowed memory is 120MB and your current memory usage is 171MB.</p>
<p>You need to either find a way to keep your memory down or you&#8217;ll have to upgrade to a plan that allows more memory.</p>
<p>Please respond to this message to let us know how you&#8217;re dealing with the problem.</p>
<p>Below is the list of processes that you&#8217;re running with the memory that they use (the command used to list these processes is "ps -u victorlin -o rss,etime,pid,command"):</p>
<p>User &#8211; Memory &#8211; Elapsed Time &#8211; Pid &#8211; Command:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
victorlin &#8211; 3MB &#8211; 7 days, 12:35:07 &#8211; 23278 &#8211; /usr/local/bin/python2.4 /home/victorlin/webapps/zope/Zope-2.10.5-final.install/lib/python/zdaemon/zdrun.py -S /home/victorlin/webapps/zope/Zope-2.10.5-final.install/lib/python/Zope2/Startup/zopeschema.xml -b 10 -d -s /home/victorlin/webapps/zope/Zope/var/zopectlsock -x 0,2 -z /home/victorlin/webapps/zope/Zope /home/victorlin/webapps/zope/Zope/bin/runzope<br />
victorlin &#8211; 168MB &#8211; 7 days, 12:35:07 &#8211; 23279 &#8211; /usr/local/bin/python2.4 /home/victorlin/webapps/zope/Zope-2.10.5-final.install/lib/python/Zope2/Startup/run.py -C /home/victorlin/webapps/zope/Zope-2.10.5-final.instance/etc/zope.conf</p>
<p>Regards,</p>
<p>WebFaction team &#8211; http://www.webfaction.com</p></blockquote>
<h2>回信</h2>
<blockquote><p>Hi, Thanks for announce this.</p>
<p>At first, I decide to buy your shared 1 plan for my Plone site, but it eat more than 100MB, so I have no choice, I buy shared 2, namely, Plone ate my money! Wow! Damn you! Plone!</p>
<p>To be honor, I hate Plone! It is a monster! Eat so much resource. It inherit so many legacy stuff from Zope, so that it is so fat. I have tried to understand Plone, but however, there is too many legacy stuff to understand. Too heavy, too old, too verbose. However, it is really easy to use and powerful.</p>
<p>After that, I setup another sites: WordPress and phpBB. Hum&#8230; Two sites and a monster, no doubt the memory usage would exceed limit.</p>
<p>I love your service so much, you have extremely nice support, fantastic control panel. Upgrading plan should be the most easiest way to solve the problem. I would willing to pay more money, if I am rich, but unfortunately, I am a poor student have no much money. And my site is for tutorials about Python and C in chinese. (There is little resource about Python written in chinese). I could only earn little money from Google AdSense. So I think it&#8217;s better to put upgrading as the last solution. I have some ideas:</p>
<p>1. Replace Plone with other CMF or something like that<br />
The monster: Plone ate most of memory. So if I can replace it with other CMF, wiki or something like that. It might solve the problem. I used Plone to write tutorial articles only, so that&#8217;s no need to use too powerful CMF or web application. I have no much idea about other CMF or web application that could suit my needs. Could you please provide me a list of non-monster solution? That could be helpful. Thanks.</p>
<p>2. Move my blog(WordPress) and phpBB to another server(my computer, or server of my school, or some free hosting, may be)<br />
I think shared 2 should be enough for dedicate Plone site. So once I move blog and phpBB out, it should solve that problem. But I have some question. Could I redirect my domain names to other server? For example, if I move phpBB to one server of my school. I&#8217;d like to set forum.ez2learn.com to specific IP address of my school&#8217;s server. Can I do that? I have no much idea about DNS and how could I do with your control panel.</p>
<p>3. At last, damn it! I have no choice but pay, for the monster<br />
This is the easiest way to solve problem. But I hate to pay, for the monster Plone. And what&#8217;s more, if I upgrade plan to shared 3, I might have enough memory to run my sites, but how about bandwidth and disk space? The bottleneck is memory, but I have to buy bandwith, disk space, too. That doesn&#8217;t make sense. I have to buy something that I don&#8217;t need. If there is a lots of people visit my site, may be I can earn money from ads to pay, and the bandwith usage will not be a pity. But however, there is little people visit my site now. Indeed, it might already be a pity to upgrade shared 1 to shared 2 for monster Plone. So, can I upgrade only the memory but not bandwith and diskspace? It would be nice to buy what I need exactly, rather than everything.</p>
<p>Thanks.<br />
Best regards.</p>
<p>Victor Lin.</p></blockquote>
<p>他們都喜歡regard來regard去，又或著cheer之類的，我也有樣學樣，跟著regard回去 XD</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2008/10/02/response-for-webfactio/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>這個網站的主機商 : WebFaction</title>
		<link>http://blog.ez2learn.com/2008/09/28/hosting-of-this-site/</link>
		<comments>http://blog.ez2learn.com/2008/09/28/hosting-of-this-site/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 15:28:41 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[中文文章]]></category>
		<category><![CDATA[網站]]></category>
		<category><![CDATA[設計]]></category>
		<category><![CDATA[Unix-Like]]></category>
		<category><![CDATA[主機商]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Plone]]></category>
		<category><![CDATA[Rail on Ruby]]></category>
		<category><![CDATA[TurboGears]]></category>
		<category><![CDATA[WebFaction]]></category>
		<category><![CDATA[架站]]></category>

		<guid isPermaLink="false">http://blog.ez2learn.com/?p=20</guid>
		<description><![CDATA[主機商WebFaction 今天我要介紹我的網站所使用的主機商 : WebFaction 為什麼選擇這家主機商 我會選擇這家主機商的最主要原因，是因為他們有提供TurboGears、Django、Plone等各種我需要的Python網頁開發框架，或程式的虛擬主機服務，市面上最常見的主流虛擬主機服務都是以PHP為主，因此較難找到我需要能夠執行TurboGears和Plone的主機商，在經過找尋了一陣子，最後終於找到了這家主機商，其中也搜尋了不少在TurboGears的Google group的討論和評價，他們對於此主機商的評價都相當高，他們說這主機商盡力想讓他們的客戶高興，於是我就決使用這家主機商，用線上刷卡訂購了虛擬主機的服務，幾個小時內，網站就啟用了，相當地有效率 出色的控制面版 因為是較非主流的應用，所以不會看到常見的cPanel等虛擬主機的控制面版，而是他們自行研發的控制面版，他們在網站上有提供許多控制面版的示範影片，其中包括如何用來建置TurboGears的網站，或是Plone之類的程式，有興趣可以參考看看 面版控制示範影片 相信看完就可以大約了解，這控制面版相當地好用，操作很簡單，加上有示範影片可以看，帳戶開通沒多久我立刻成功地建立了一個Plone的站台 不可思議的優秀客服支援 如同我所見到的評價，他們的客服真的是盡力讓他們客戶高興的客服，因為有六十天無條件退款的保證，所以我決定當一個澳客，帳戶一開通我就毫不客氣地盡量使用客服，他們都很友善的回答，技術上的問題，他們都答得出來，他們建置了一個專門的知識庫 WebFaction 的客服 這網頁是開放的，即使你沒有帳號，你一樣可以在裡面找到很多有用的問題的解決方法，我發了幾個問題，他們都找到在裡面的解決方案然後跟我說明要如何解決，當一個發問不爬文的澳客感覺還真不錯 :P 以下是一封我題出問題和客服的對話，就可以明白他們的客服都相當友善，而且都有相當程度的專業知識 victorlin Hi, I configure Plone mail setting by following this article: https://help.webfaction.com/index.php?_m=knowledgebase&#038;_a=viewarticle&#038;kbarticleid=82 But I always got a " Error Please correct the &#8230; <a href="http://blog.ez2learn.com/2008/09/28/hosting-of-this-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>主機商WebFaction</h2>
<p>今天我要介紹我的網站所使用的主機商 : <a href="http://www.webfaction.com/?affiliate=victorlin">WebFaction</a></p>
<p><span id="more-20"></span></p>
<h3>為什麼選擇這家主機商</h3>
<p>我會選擇這家主機商的最主要原因，是因為他們有提供TurboGears、Django、Plone等各種我需要的Python網頁開發框架，或程式的虛擬主機服務，市面上最常見的主流虛擬主機服務都是以PHP為主，因此較難找到我需要能夠執行TurboGears和Plone的主機商，在經過找尋了一陣子，最後終於找到了這家主機商，其中也搜尋了不少在TurboGears的Google group的討論和評價，他們對於此主機商的評價都相當高，他們說這主機商盡力想讓他們的客戶高興，於是我就決使用這家主機商，用線上刷卡訂購了虛擬主機的服務，幾個小時內，網站就啟用了，相當地有效率</p>
<h3>出色的控制面版</h3>
<p>因為是較非主流的應用，所以不會看到常見的cPanel等虛擬主機的控制面版，而是他們自行研發的控制面版，他們在網站上有提供許多控制面版的示範影片，其中包括如何用來建置TurboGears的網站，或是Plone之類的程式，有興趣可以參考看看</p>
<p><a href="http://www.webfaction.com/demos/control-panel?affiliate=victorlin">面版控制示範影片</a></p>
<p>相信看完就可以大約了解，這控制面版相當地好用，操作很簡單，加上有示範影片可以看，帳戶開通沒多久我立刻成功地建立了一個Plone的站台</p>
<h3>不可思議的優秀客服支援</h3>
<p>如同我所見到的評價，他們的客服真的是盡力讓他們客戶高興的客服，因為有六十天無條件退款的保證，所以我決定當一個澳客，帳戶一開通我就毫不客氣地盡量使用客服，他們都很友善的回答，技術上的問題，他們都答得出來，他們建置了一個專門的知識庫</p>
<p><a href="https://help.webfaction.com/?affiliate=victorlin">WebFaction 的客服</a></p>
<p>這網頁是開放的，即使你沒有帳號，你一樣可以在裡面找到很多有用的問題的解決方法，我發了幾個問題，他們都找到在裡面的解決方案然後跟我說明要如何解決，當一個發問不爬文的澳客感覺還真不錯  :P</p>
<p>以下是一封我題出問題和客服的對話，就可以明白他們的客服都相當友善，而且都有相當程度的專業知識</p>
<p><strong><span class="ticketpostname">victorlin</span></strong></p>
<blockquote><p><span class="mediumtext">Hi, I configure Plone mail setting by following this article:</span></p>
<p>https://help.webfaction.com/index.php?_m=knowledgebase&#038;_a=viewarticle&#038;kbarticleid=82</p>
<p>But I always got a " Error Please correct the indicated errors. " error when sending a mail from plone. What am I doing wrong?</p>
<p>This is the configuration I set.</p>
<p>SMTP : *******<br />
SMTP port : 25<br />
ESMTP username : ********<br />
ESMTP password : (the password I set)<br />
From name : Site Administrator<br />
From e-mail : *********</p>
<p>Thanks.</p></blockquote>
<p><strong><span class="ticketpostname">Sime Ramov</span></strong></p>
<blockquote><p><span class="mediumtext">Hi,</span></p>
<p>&gt; But I always got a " Error Please correct the indicated errors. "<br />
&gt; error when sending a mail from plone. What am I doing wrong?</p>
<p>Does anything gets indicated? With red color or something? Could you<br />
post a screenshot?</p>
<p>&gt; This is the configuration I set.<br />
&gt;<br />
&gt; [...]</p>
<p>By the looks of it, the configuration looks fine.</p>
<p>Hope this helps and thanks for using WebFaction!</p>
<p>Best regards,<br />
&#8211; Sime</p></blockquote>
<p><strong><span class="ticketpostname">victorlin</span></strong></p>
<blockquote><p><span class="mediumtext">That bar says "Error Please correct the indicated errors.", but I don&#8217;t see any thing in errors of plone site setup. I have no idea where to see the error.</span></p>
<p>Thanks.</p></blockquote>
<p><strong><span class="ticketpostname">Sean Fulmer</span></strong></p>
<blockquote><p><span class="mediumtext">Hi Victor,</span></p>
<p>&gt; That bar says "Error Please correct the indicated errors.", but I don&#8217;t see<br />
&gt; any thing in errors of plone site setup. I have no idea where to see the<br />
&gt; error.</p>
<p>I&#8217;ve just sent myself an email from your site<br />
(http://ez2learn.com/99969801/sendto_form) and encountered no errors. I<br />
received the email a few seconds after I submitted the form.</p>
<p>It looks like this is working fine, but if you are still having trouble,<br />
please let us know the exact steps we can take to reproduce the error.</p>
<p>Thanks,</p>
<p>Sean Fulmer<br />
WebFaction Support</p></blockquote>
<p><strong><span class="ticketpostname">victorlin</span></strong></p>
<blockquote><p><span class="mediumtext">Oh, I send a article to my email without error, too. But I encounter that problem that I just mentioned before, when I use contact of my Plone site</span></p>
<p>http://www.ez2learn.com/contact-info</p>
<p>Once I send a mail by contact page, here comes the problem.</p></blockquote>
<p><strong><span class="ticketpostname">Sean Fulmer</span></strong></p>
<blockquote><p><span class="mediumtext">&gt; Oh, I send a article to my email without error, too. But I encounter that problem that I just mentioned before, when I use contact of my Plone site<br />
&gt;<br />
&gt; http://www.ez2learn.com/contact-info<br />
&gt;<br />
&gt; Once I send a mail by contact page, here comes the problem.</span></p>
<p>I just sent a test message from http://www.ez2learn.com/contact-info and did not encounter an error.</p>
<p>I&#8217;ve just noticed that your email address did not include your mailbox as a target, so I added your &#8216;victorlin&#8217; mailbox as a target for the address: https://panel.webfaction.com/email/read/24069</p>
<p>Can you tell if if that solved the problem for you?</p>
<p>Regards,</p>
<p>Sean Fulmer<br />
WebFaction Support</p></blockquote>
<p><strong><span class="ticketpostname">victorlin</span></strong></p>
<blockquote><p><span class="mediumtext">Nope. I still encounter that problem.</span></p>
<p>Wow! That&#8217;s so strange!<br />
It doesn&#8217;t make sense. I have never send a mail successfully by that contact page, how do you do that? What language do you use to browser my contact page?</p>
<p>By the way, I love your nice service and fantastic supporting! Nice job! :P</p></blockquote>
<p><strong><span class="ticketpostname">Sean Fulmer</span></strong></p>
<blockquote><p><span class="mediumtext">Hi Victor,</span></p>
<p>&gt; Nope. I still encounter that problem.<br />
&gt;<br />
&gt; Wow! That&#8217;s so strange!<br />
&gt; It doesn&#8217;t make sense. I have never send a mail successfully by that contact<br />
&gt; page, how do you do that? What language do you use to browser my contact<br />
&gt; page?</p>
<p>My browser is set to use English, but your site appears in Chinese for me.</p>
<p>Can you tell me the email &#8216;from&#8217; address that your Plone user account is<br />
using? I&#8217;ll try another test message from that address.</p>
<p>Also, if you could switch the site over to English, I might be better able to<br />
troubleshoot this.</p>
<p>&gt; By the way, I love your nice service and fantastic supporting! Nice job! :P</p>
<p>Thanks :)</p>
<p>Regards,</p>
<p>Sean Fulmer<br />
WebFaction Support</p></blockquote>
<p><strong><span class="ticketpostname">victorlin</span></strong></p>
<blockquote><p><span class="mediumtext">Oops! How stupid am I XD<br />
I login as my account, and that account did&#8217;t setup e-mail. That should be why I can&#8217;t send mail from contact page, but you can. Now I setup my e-mail, and everything works fine.</span></p>
<p>Thanks your help! :P</p></blockquote>
<p><strong><span class="ticketpostname">Sean Fulmer</span></strong></p>
<blockquote><p><span class="mediumtext">Hi Victor,</span></p>
<p>&gt; Oops! How stupid am I XD<br />
&gt; I login as my account, and that account did&#8217;t setup e-mail. That should be<br />
&gt; why I can&#8217;t send mail from contact page, but you can. Now I setup my e-mail,<br />
&gt; and everything works fine.</p>
<p>Aha! That would explain it :)</p>
<p>&gt; Thanks your help! :P</p>
<p>You&#8217;re very welcome!  Thanks for using WebFaction :)</p>
<p>Regards,</p>
<p>Sean Fulmer<br />
WebFaction Support</p></blockquote>
<p>結果到最後發現是自己在耍笨，但是整個過程中客服還是盡力的想幫我解決問題</p>
<h3>我原本所擔心的</h3>
<p>其實我原本最擔心的問題是，虛擬主機會不會有太多限制讓我沒辦法使用某些東西，例如某些Python的模組，可是我發現他們有提供SSH的連線，可以遠端登入到自己的帳號下指令，這讓使用上沒有太大的限制，如下圖所示的，使用遠端登入帳號來下指令</p>
<div id="attachment_28" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.ez2learn.com/wp-content/uploads/2008/09/2008-09-28_233501.png"><img class="size-medium wp-image-28" title="遠端登入WebFaction帳號" src="http://blog.ez2learn.com/wp-content/uploads/2008/09/2008-09-28_233501-300x188.png" alt="遠端登入WebFaction帳號" width="300" height="188" /></a><p class="wp-caption-text">遠端登入WebFaction帳號</p></div>
<h3>結論</h3>
<p>結論就是，這家主機商真的很不錯，值得推薦:P</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ez2learn.com/2008/09/28/hosting-of-this-site/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

