<?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>styx.studio</title>
	<atom:link href="http://bystyx.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://bystyx.com/blog</link>
	<description>Red hypergiant star located in the constellation Canis Major.</description>
	<lastBuildDate>Tue, 08 May 2012 19:35:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>MagicMouse 가 느려질 때&#8230;</title>
		<link>http://bystyx.com/blog/?p=372</link>
		<comments>http://bystyx.com/blog/?p=372#comments</comments>
		<pubDate>Tue, 08 May 2012 19:35:55 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=372</guid>
		<description><![CDATA[http://support.apple.com/kb/HT1365 요새 이상하게 마우스가 느려지는 현상이 발생하고 있다. 맥북프로를 2010년에 구입해서 지금까지 한번 그런적이 없다가. 사용패턴을 바꿔서 집에 외장모니터에 연결하고 데스크탑 대용으로 쓰기 시작하면서 느끼는 증상 CPU가 버벅 거리는 것도 아닌데, 이따금씩 트랙킹이 느려진다거나 멈춘다거나 하는 증상 때문에, 너무 불편해서 &#8216;아 Bluetooth 는 아직 주옥 같구나&#8230;&#8217; 하며, 그냥 무선으로 쓰는것에 감사하자 하던 터에 검색을 해보니 [...]]]></description>
			<content:encoded><![CDATA[<p>http://support.apple.com/kb/HT1365</p>
<p>요새 이상하게 마우스가 느려지는 현상이 발생하고 있다.</p>
<p>맥북프로를 2010년에 구입해서 지금까지 한번 그런적이 없다가.<br />
사용패턴을 바꿔서 집에 외장모니터에 연결하고 데스크탑 대용으로 쓰기 시작하면서 느끼는 증상</p>
<p>CPU가 버벅 거리는 것도 아닌데, 이따금씩 트랙킹이 느려진다거나 멈춘다거나 하는 증상 때문에,<br />
너무 불편해서 &#8216;아 Bluetooth 는 아직 주옥 같구나&#8230;&#8217; 하며,<br />
그냥 무선으로 쓰는것에 감사하자 하던 터에 검색을 해보니<br />
Bluetooth 와 wifi 가 같은 주파수 대역 2.4GHz 을 사용한다는 것을 배우고,<br />
&#8216;Aㅏ 공유기 또 사야하나&#8230;&#8217; 라는 좌절 중. 위의 URL을 찾았으니&#8230;</p>
<blockquote><p>Certain external monitors and LCD displays: Certain displays may emit harmonic interference, especially in the 2.4GHz band between channels 11 and 14. This interference may be at its worst if you have a portable computer with the lid closed and an external monitor connected to it. Try changing your access point to use 5 Ghz or a lower 2.4 GHz channel.</p></blockquote>
<blockquote><p>특정 외장 모니터 및 LCD 디스플레이: 특정 디스플레이, 특히 채널 11~14의 2.4GHz 대역에서 고조파 간섭이 생길 수 있습니다. 이러한 간섭은 휴대용 컴퓨터의 뚜껑이 닫혀 있고 외장 모니터가 연결되어 있는 경우 가장 심해질 수 있습니다. 5Ghz 또는 하위 2.4GHz 채널을 사용하도록 액세스 포인트를 변경하십시오.</p></blockquote>
<p>딱 내가 이런 환경. MBP Lid 를 닫아둔 상태에서 외장 LCD모니터를 쓰고 있고, 2.4GHz 대역의 무선 공유기를 사용하고 있으니 말이다.<br />
그래서 사용하는 wifi 를 2.4 하위 채널을 1번으로 무작정 바꾸고나니, Delay 도 거의 사라지고 버벅임도 없다.</p>
<p>&#8220;공유기 안사도 됨&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=372</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nginx settings</title>
		<link>http://bystyx.com/blog/?p=349</link>
		<comments>http://bystyx.com/blog/?p=349#comments</comments>
		<pubDate>Fri, 05 Aug 2011 08:44:31 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[conf]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=349</guid>
		<description><![CDATA[5년간 사용하던 lighttpd 에서, nginx 로 바꾸게 되었는데, apache 를 사용하던 사람들 입장에선 nginx 설정이 쉽다고 하지만, lighttpd 를 사용한 입장에선, 별로.. global 지시자가 없어서, location {} 마저 server {} 마다 집어넣어줘야 하는 불편이 이만저만 아니다. location {} 을 http{} 에서 global 선언이 안되다 보니, fastcgi 역시 매 vhost 의 server {} 에 넣어줘야하는 답답함. [...]]]></description>
			<content:encoded><![CDATA[<p>5년간 사용하던 lighttpd 에서, nginx 로 바꾸게 되었는데,<br />
apache 를 사용하던 사람들 입장에선 nginx 설정이 쉽다고 하지만,<br />
lighttpd 를 사용한 입장에선, 별로..</p>
<p>global 지시자가 없어서, location {} 마저 server {} 마다 집어넣어줘야 하는 불편이 이만저만 아니다.<br />
location {} 을 http{} 에서 global 선언이 안되다 보니, fastcgi 역시 매 vhost 의 server {} 에 넣어줘야하는 답답함.<br />
첫 migration 작업이 진행되고, conf 파일을 작성하면서, conf 가 너무 불필요하게 길어지다 보니,<br />
include 로 공통적인 부분은 아예 빼서 처리하기로 한다.</p>
<p>기본 구성은</p>
<p><code>/etc/nginx/nginx.conf<br />
/etc/nginx/conf.d/virtual.conf<br />
/etc/nginx/fastcgi_params</code><br />
이나,</p>
<p><code>/etc/nginx/global_params<br />
/etc/nginx/global_ssl_params<br />
/etc/nginx/fastcgi_ssl_params (copy from fastcgi_params)<br />
</code><br />
를 따로 준비했다.</p>
<p>/etc/nginx/nginx.conf 는 별도로 특이사항은 없으므로 pass!</p>
<p><strong>/etc/nginx/virtual.conf</strong></p>
<pre># connect to php-fpm (unix socket)
upstream backend {
        server unix:/tmp/php-fpm.sock;
}

# non-SSL virtual host (80)
server {
        server_name domain.tld www.domain.tld;
        root /home/user/web_pub;
        include global_params;
        include fastcgi_params;
}

# SSL-enabled virtual host (443)
server {
        server_name domain.tld www.domain.tld;
        root /home/user/web_pub;
        include global_ssl_params;
        include fastcgi_params;
}</pre>
<p><strong>/etc/nginx/global_params</strong></p>
<pre>
listen 80;
index  index.html index.php;
location ~ /\.ht {
        deny all;
}</pre>
<p><strong>/etc/nginx/global_ssl_params</strong><br />
global_params 와 동일하나 80 이 443으로 바뀌고 SSL 항목이 추가됨.</p>
<pre>
listen 443;
index index.html;

ssl on;
ssl_certificate /etc/yourssl.crt;
ssl_certificate_key /etc/yourssl.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;

location ~ /\.ht {
        deny all;
}</pre>
<p><strong>/etc/nginx/fastcgi_params</strong><br />
중간 set,if 는 phpschool에서 <a href="http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&#038;wr_id=73442">송효진님 글</a> 참조.</p>
<pre>
location ~ \.(php|html)($|/) {
        fastcgi_index   index.php;
        fastcgi_pass    backend;

        fastcgi_param   QUERY_STRING            $query_string;
        fastcgi_param   REQUEST_METHOD          $request_method;
        fastcgi_param   CONTENT_TYPE            $content_type;
        fastcgi_param   CONTENT_LENGTH          $content_length;

        set $fastcgi_script_realname $fastcgi_script_name;

        if ( $fastcgi_script_name ~ ^(.*\.php)(/.*)$ ) {
                set $fastcgi_script_realname $1;
                set $path_info $2;
        }

        if (!-f $document_root$fastcgi_script_realname) {
                return 404;
        }

        fastcgi_param   PATH_INFO               $path_info;
        fastcgi_param   SCRIPT_NAME             $fastcgi_script_realname;
        fastcgi_param   SCRIPT_FILENAME         $document_root$fastcgi_script_realname;
        fastcgi_param   REQUEST_URI             $request_uri;
        fastcgi_param   DOCUMENT_URI            $document_uri;
        fastcgi_param   DOCUMENT_ROOT           $document_root/;
        fastcgi_param   SERVER_PROTOCOL         $server_protocol;

        fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
        fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;

        fastcgi_param   REMOTE_ADDR             $remote_addr;
        fastcgi_param   REMOTE_PORT             $remote_port;
        fastcgi_param   SERVER_ADDR             $server_addr;
        fastcgi_param   SERVER_PORT             $server_port;
        fastcgi_param   SERVER_NAME             $server_name;

        # PHP only, required if PHP was built with --enable-force-cgi-redirect
        fastcgi_param   REDIRECT_STATUS         200;
}</pre>
<p><strong>/etc/nginx/fastcgi_ssl_params</strong><br />
fastcgi_params 와 동일하지만, HTTPS on; 이 추가 되어있다. (phpMyAdmin 에서 https 여부 확인 enviroment)</p>
<pre>
...
        fastcgi_param   SERVER_PORT             $server_port;
        fastcgi_param   SERVER_NAME             $server_name;
        fastcgi_param   HTTPS                   on;
        # PHP only, required if PHP was built with --enable-force-cgi-redirect
        fastcgi_param   REDIRECT_STATUS         200;
}</pre>
<p>위와 같이 파일을 분리해서 virtual.conf 작성시,<br />
include 만으로 해당 기능을 사용하고, 정의할 수 있기 때문에 조금 더 간결하게 conf 를 작성하고 관리할 수 있을 것 같다.</p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=349</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lighttpd php 보안설정</title>
		<link>http://bystyx.com/blog/?p=331</link>
		<comments>http://bystyx.com/blog/?p=331#comments</comments>
		<pubDate>Sun, 24 Jul 2011 18:20:06 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[check-local]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=331</guid>
		<description><![CDATA[lighttpd 1.5.x 에서 lighttpd 1.4 대로 내려온 이후 (1.5 개 개발이 더이상 진행하지 않음으로) 설정파일을 다시 작성하던 중에, 아이러니 한 부분이 있어서, 찾아보다가&#8230; 이런 링크를 발견. 즉. http://bystyx.com/test.txt 라는 파일이 있으며, 이 URL을 그대로 실행하면 php 코드가 그대로 노출이 되나, http://bystyx.com/test.txt/nonexists.php 와 같이, URL 끝에만 php 를 붙여주면 test.txt 가 php로 실행이 된다. fastcgi.server 문법에 [...]]]></description>
			<content:encoded><![CDATA[<p>lighttpd 1.5.x 에서 lighttpd 1.4 대로 내려온 이후 (1.5 개 개발이 더이상 진행하지 않음으로)<br />
설정파일을 다시 작성하던 중에, 아이러니 한 부분이 있어서, 찾아보다가&#8230;</p>
<p>이런 <a href="http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&#038;wr_id=73442#c_73443">링크</a>를 발견. </p>
<p>즉.<br />
<code>http://bystyx.com/test.txt</code> 라는 파일이 있으며,<br />
이 URL을 그대로 실행하면 php 코드가 그대로 노출이 되나,</p>
<p><code>http://bystyx.com/test.txt/nonexists.php</code> 와 같이,<br />
URL 끝에만 php 를 붙여주면 test.txt 가 php로 실행이 된다.</p>
<p><code>fastcgi.server</code> 문법에 pcre 가 지원하지 않으므로 <code>$HTTP["url"]</code> 에서 filtering 할 수 있지 않을까 했는데,<br />
<code>$HTTP["url"]</code> 는 physical path 가 아닌, 단순 URI를 이어서, 실제 파일인지는 구분하지 못한다.</p>
<p>결국 php.ini 의 <code>auto_prepend_file </code>에 <code>SCRIPT_FILENAME</code> 을 체크하는 코드를 삽입해놨는데,<br />
이것도 정석은 아닌듯 하여, 찾아보니&#8230;</p>
<p><code>"check-local" => "enable"</code></p>
<p>이 구문을 <code>fastcgi.server</code> 에 포함 하면 된다.<br />
좀 아이러니 한건, 구글링해서 나오는 결과에서 대부분 이 항목을 disable 로 둔다는 것이다. (뭐지&#8230;)</p>
<p><code>fastcgi.server</code> 설정 예시</p>
<p><code>fastcgi.server = ( ".php" => (<br />
        "php-tcp" => (<br />
        "host" => "127.0.0.1",<br />
        "port" => 9000,<br />
        "check-local" => "enable",<br />
        "broken-scriptfilename" => "enable",<br />
)))</code></p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=331</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lighttpd rewrite example for xpressengine</title>
		<link>http://bystyx.com/blog/?p=287</link>
		<comments>http://bystyx.com/blog/?p=287#comments</comments>
		<pubDate>Sat, 05 Feb 2011 22:07:42 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[xe]]></category>
		<category><![CDATA[xpressengine]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=287</guid>
		<description><![CDATA[xpressengine 의 lighttpd web server 를 위한 rewrite config example Directory 기반의 .htaccess 를 지원하지 않아 DocumentRoot 기준으로 작성을 해야하므로, 디렉토리명은 각자 설치된 내용에 따라 변경하여 사용한다. url.rewrite = ( &#160;&#160;&#160;&#160;"^/xe/(layouts&#124;m.layouts)/(.+)/(.+)\.html$" => "xe/index.php", &#160;&#160;&#160;&#160;"^/xe/(.+)/files/(member_extra_info&#124;attach&#124;cache&#124;faceOff)/(.*)" => "xe/files/$2/$3", &#160;&#160;&#160;&#160;"^/xe/(.+)/(files&#124;modules&#124;common&#124;widgets&#124;widgetStyle&#124;layouts&#124;m.layouts&#124;addons)/(.*)" => "xe/$2/$3", &#160;&#160;&#160;&#160;"^(rss&#124;atom)$" => "xe/index.php?module=rss&#038;act=$1", &#160;&#160;&#160;&#160;"^([a-zA-Z0-9_]+)/(rss&#124;atom&#124;api)$" => "xe/index.php?mid=$1&#038;act=$2", &#160;&#160;&#160;&#160;"^/xe/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss&#124;atom&#124;api)$" => "xe/index.php?vid=$1&#038;mid=$2&#038;act=$3", &#160;&#160;&#160;&#160;"^/xe/([0-9]+)/(.+)/trackback$" => "xe/index.php?document_srl=$1&#038;key=$2&#038;act=trackback", &#160;&#160;&#160;&#160;"^/xe/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$" => "xe/index.php?vid=$1&#038;document_srl=$2&#038;key=$3&#038;act=trackback", &#160;&#160;&#160;&#160;"^/xe/admin/?$" [...]]]></description>
			<content:encoded><![CDATA[<p>xpressengine 의 lighttpd web server 를 위한 rewrite config example</p>
<p>Directory 기반의 .htaccess 를 지원하지 않아 DocumentRoot 기준으로 작성을 해야하므로,<br />
디렉토리명은 각자 설치된 내용에 따라 변경하여 사용한다.<br />
<span id="more-287"></span></p>
<pre>url.rewrite = (
&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/(layouts|m.layouts)/(.+)/(.+)\.html$" => "xe/index.php",

&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*)" => "xe/files/$2/$3",
&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/(.+)/(files|modules|common|widgets|widgetStyle|layouts|m.layouts|addons)/(.*)" => "xe/$2/$3",

&nbsp;&nbsp;&nbsp;&nbsp;"^(rss|atom)$" => "xe/index.php?module=rss&#038;act=$1",
&nbsp;&nbsp;&nbsp;&nbsp;"^([a-zA-Z0-9_]+)/(rss|atom|api)$" => "xe/index.php?mid=$1&#038;act=$2",
&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$" => "xe/index.php?vid=$1&#038;mid=$2&#038;act=$3",

&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([0-9]+)/(.+)/trackback$" => "xe/index.php?document_srl=$1&#038;key=$2&#038;act=trackback",
&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$" => "xe/index.php?vid=$1&#038;document_srl=$2&#038;key=$3&#038;act=trackback",

&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/admin/?$" => "xe/index.php?module=admin",

&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([0-9]+)$" => "xe/index.php?document_srl=$1",

&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/?$" => "xe/index.php?mid=$1",
&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/([0-9]+)$" => "xe/index.php?mid=$1&#038;document_srl=$2",

&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$" => "xe/index.php?vid=$1&#038;mid=$2",
&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$" => "xe/index.php?vid=$1&#038;mid=$2&#038;document_srl=$3",

&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/entry/(.+)$" => "xe/index.php?mid=$1&#038;entry=$2",
&nbsp;&nbsp;&nbsp;&nbsp;"^/xe/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$" => "xe/index.php?vid=$1&#038;mid=$2&#038;entry=$3"
)</pre>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=287</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS &#8211; Installing Nginx via yum</title>
		<link>http://bystyx.com/blog/?p=265</link>
		<comments>http://bystyx.com/blog/?p=265#comments</comments>
		<pubDate>Sat, 29 Jan 2011 22:09:37 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[epel]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[repos]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=265</guid>
		<description><![CDATA[Nginx is a popular lightweight server for those who do not need the bulk and extra services that Apache may offer. This article will look at installing Nginx on a CentOS Slice using the &#8216;yum&#8217; package manager. Yum Using the inbuilt package manager to install packages is a great idea as it solves dependency issues [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Nginx home page" href="http://nginx.net/">Nginx</a> is a popular lightweight server for those who do not need the bulk and extra services that Apache may offer.</p>
<p>This article will look at installing Nginx on a CentOS Slice using the &#8216;yum&#8217; package manager.</p>
<hr />
<h3>Yum</h3>
<p>Using the inbuilt package manager to install packages is a great idea as it solves dependency issues and you are assured of any security updates if, and when, they occur.</p>
<p>However, one drawback can be that it is rare for a version upgrade to be placed into the repositories. As such, it is possible for a newer version of an application to be released and not be placed into the repository.</p>
<h3>EPEL</h3>
<p>To install Nginx using yum we will need to include the <a title="EPEL Home Page" href="http://fedoraproject.org/wiki/EPEL">EPEL</a> (Extra Packages for Enterprise Linux) repository. This repository was developed by the Fedora community to provide extra add-on packages for Fedora-based Redhat Enterprise Linux and it&#8217;s other compatible offspring such as CentOS.</p>
<p>One thing to keep in mind when adding extra repositories is that many include newer versions of packages that are readily available through the standard channels. This can cause problems as packages can be automatically upgraded and cease to function as expected.</p>
<p>I want to make it clear that the EPEL repository is purely complimentary and only provides additional packages that are otherwise unavailable through the default repositories.</p>
<h3>Versions</h3>
<p>Using yum in conjunction with the EPEL repository, CentOS will install Nginx version 0.6.33.</p>
<p>However, at the time of writing, the latest stable version of Nginx is 0.6.34. You can check the latest versions and change logs at the <a title="Nginx Home Page" href="http://nginx.net/">main nginx site</a>.</p>
<p>Which one you choose is, of course, entirely up to you.</p>
<p>If you decide you would rather have a later version of Nginx than the one the EPEL repository provides, then please refer to the sister article (link on the way) which will take you through the process of installing Nginx from source.</p>
<h3>Installation and Dependencies</h3>
<p>Let&#8217;s begin by installing the EPEL repository:</p>
<pre><code>sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm</code></pre>
<p>Installing nginx using Yum is now incredibly simple, thanks to EPEL, as it involves one command:</p>
<pre><code>sudo yum install nginx</code></pre>
<p>As this will be the first package we install using EPEL, we will be asked to import the EPEL gpg-key.</p>
<pre><code>warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
Importing GPG key 0x217521F6 "Fedora EPEL &lt;epel@fedoraproject.org&gt;" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
Is this ok [y/N]:</code></pre>
<p>This key is used to sign all packages that are associated with the EPEL repository to verify their validity.</p>
<p>Once the gpg-key has been imported, the installation should proceed as expected.</p>
<p>This will install any dependencies that Nginx requires and actually incorporates the experimental Perl module. You can read more documentation about this feature as well as many others at <a title="Nginx's English Wiki" href="http://wiki.nginx.org/">Nginx&#8217;s English Wiki</a>.</p>
<h3>Start</h3>
<p>One odd thing is that Nginx is not started automatically:</p>
<pre><code>sudo /etc/init.d/nginx start</code></pre>
<p>Done</p>
<h3>Navigate</h3>
<p>Now simply navigate to your IP address:</p>
<pre><code>http://123.45.67.890</code></pre>
<p>and you will see the following welcome screen:</p>
<p><img title="Nginx Welcome Screen" src="http://articles.slicehost.com/assets/2008/12/13/CentOSNginxWelcome.png" alt="Nginx Welcome Screen" width="620" height="266" /></p>
<h3>Init Scripts</h3>
<p>As you would imagine when installing an application with the yum package manager, all init scripts have been created.</p>
<p>However, we need to set up Nginx to start automatically if the slice is rebooted:</p>
<pre><code>sudo /sbin/chkconfig nginx on</code></pre>
<p>Controlling nginx is done with these commands:</p>
<pre><code>sudo /etc/init.d/nginx start
...
sudo /etc/init.d/nginx stop
...
sudo /etc/init.d/nginx reload
...
sudo /etc/init.d/nginx restart</code></pre>
<p>You can also check the current status as well as the configuration syntax by using the following commands:</p>
<pre><code>sudo /etc/init.d/nginx status
...
sudo /etc/init.d/nginx configtest</code></pre>
<p>The configtest option is particularly useful for testing your Nginx configuration before actually implementing it with a reload or restart.</p>
<p>That&#8217;s it.</p>
<h3>Summary</h3>
<p>Using the yum package manager along with the EPEL repository makes the installation of Nginx and associated dependencies very simple indeed.</p>
<p>The only thing to consider is the version disparity between the one offered by yum and the one available via source code.</p>
<p>Mark</p>
<p>source : <a href="http://articles.slicehost.com/2008/12/17/centos-installing-nginx-via-yum">http://articles.slicehost.com/2008/12/17/centos-installing-nginx-via-yum</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=265</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Find SCSI Hard Disk Model, Serial Number, Size, and Total Sectors Information</title>
		<link>http://bystyx.com/blog/?p=170</link>
		<comments>http://bystyx.com/blog/?p=170#comments</comments>
		<pubDate>Sat, 29 Jan 2011 11:32:35 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[harddisk]]></category>
		<category><![CDATA[hdparm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scsi]]></category>
		<category><![CDATA[sdparm]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=170</guid>
		<description><![CDATA[Simply use utility called sdparm to fetch SCSI / SATA device information. Inquiry data including Vital Product Data (VPD) pages can also be displayed. Commands associated with starting and stopping the medium; loading and unloading the medium; and other housekeeping functions may also be performed by this utility. In short you can get or set [...]]]></description>
			<content:encoded><![CDATA[<p>Simply use utility called sdparm to fetch SCSI / SATA device information. Inquiry data including Vital Product Data (VPD) pages can also be displayed. Commands associated with starting and stopping the medium; loading and unloading the medium; and other housekeeping functions may also be performed by this utility.</p>
<p>In short you can get or set SCSI hard disk parameters. If you are using ATA ( IDE ) hard disk use <a href="http://www.google.com/url?q=http%3A%2F%2Fwww.cyberciti.biz%2Ffaq%2Flinux-getting-scsi-ide-harddisk-information%2F&amp;sa=D&amp;sntz=1&amp;usg=AFrqEzfQQPSz9fP4CIlyKvg5eqUbVDjG-Q">hdparm utility</a>. </p>
<h2><a name="TOC-Install-sdparm-utility"></a>Install sdparm utility</h2>
<p>Type the following command at shell prompt:<br />
<code># apt-get install sdparm</code><br />
Red Hat / CentOS user can grab sdparm rpm package <a href="http://www.google.com/url?q=http%3A%2F%2Fdag.wieers.com%2Frpm%2Fpackages%2Fsdparm%2F&amp;sa=D&amp;sntz=1&amp;usg=AFrqEzeIbtAZV1UqIv34l243aE5J9u5-Zg">here</a>.</p>
<h2><a name="TOC-sdparm-examples"></a>sdparm examples</h2>
<p>To list common mode parameters of a disk, enter:<br />
<code># sdparm /dev/sda</code></p>
<p>To list the designators within the device identification VPD page of a disk:<br />
<code># sdparm --inquiry /dev/sdb</code></p>
<p>To see all parameters for the caching mode page:<br />
<code># sdparm --page=ca /dev/sdc</code></p>
<p>To set the &#8220;Writeback Cache Enable&#8221; bit in the current values page:<br />
<code># sdparm --set=WCE /dev/sda</code></p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=170</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cufon 으로 한글폰트 생성시 사용할 Subset</title>
		<link>http://bystyx.com/blog/?p=165</link>
		<comments>http://bystyx.com/blog/?p=165#comments</comments>
		<pubDate>Thu, 27 Jan 2011 15:06:54 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Developement]]></category>
		<category><![CDATA[cufon]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[subset]]></category>
		<category><![CDATA[typo]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=165</guid>
		<description><![CDATA[Cufon 에서 한글 TTF를 이용하여 Cufon.JS 폰트를 생성시에, Subset 선택에서 All 을 선택하게 되면, 실제 TTF용량과 비슷하거나, 혹은 이보다 더 커질 수 있다. 일반적으로 사용하는 완성형 한글 외에 특수 확장 한글까지 전부 포함이 되어서 생기는 문제가 발생하는 것이다. 해결방안은 과거 WEFT를 이용하여 웹폰트(EOT)를 만들때 사용된 Subset 에 포함된 내용을 이용하면 용량이 절반이상 줄일 수 있다. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bystyx.com/blog/wp-content/uploads/2011/01/cufonLarge.jpg"></a><a href="http://bystyx.com/blog/wp-content/uploads/2011/01/cufonLarge.jpg"><img class="size-medium wp-image-179 alignright" title="cufonLarge" src="http://bystyx.com/blog/wp-content/uploads/2011/01/cufonLarge-275x300.jpg" alt="" width="165" height="180" /></a><a href="http://bystyx.com/blog/wp-content/uploads/2011/01/cufonLarge.jpg"></a>Cufon 에서 한글 TTF를 이용하여 Cufon.JS 폰트를 생성시에, Subset 선택에서 All 을 선택하게 되면, 실제 TTF용량과 비슷하거나, 혹은 이보다 더 커질 수 있다. 일반적으로 사용하는 완성형 한글 외에 특수 확장 한글까지 전부 포함이 되어서 생기는 문제가 발생하는 것이다.</p>
<p>해결방안은 과거 WEFT를 이용하여 웹폰트(EOT)를 만들때 사용된 Subset 에 포함된 내용을 이용하면 용량이 절반이상 줄일 수 있다.<br />
이를 이용하기 위해서는 Cufon Generate 페이지 일부를 수정하여 적용이 가능하다.<br />
첨부된 Subset 의 내용을 입력하기 위해서는 기존 Input 태그에서는 256 글자로 제한되어있으므로, 이를 Textarea 태그로 변경하여 Subset 을 복사, 붙여넣기 하면 된다. 그리고 기본적으로 선택된 Basic 은 Uncheck 해도 무방하다.</p>
<p>* 페이지의 Include the following glyphs (if available) 의 하단에 Also include these single characters 의 &lt;input 을 &lt;textarea 로 변경.</p>
<p>링크 : <strong><a href="http://bystyx.com/blog/wp-content/uploads/2011/01/Subset.txt">Subset.txt</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=165</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Japan – The Strange Country (Japanese ver.) / Kenichi</title>
		<link>http://bystyx.com/blog/?p=134</link>
		<comments>http://bystyx.com/blog/?p=134#comments</comments>
		<pubDate>Wed, 31 Mar 2010 17:13:15 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[country]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[japan]]></category>
		<category><![CDATA[motion]]></category>
		<category><![CDATA[vector]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=134</guid>
		<description><![CDATA[Japan &#8211; The Strange Country (Japanese ver.) from Kenichi on Vimeo.]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="615" height="346" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=9873910&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="615" height="346" src="http://vimeo.com/moogaloop.swf?clip_id=9873910&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/9873910">Japan &#8211; The Strange Country (Japanese ver.)</a> from <a href="http://vimeo.com/user1705963">Kenichi</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=134</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eco Coke Bottle design / Andrew Kim</title>
		<link>http://bystyx.com/blog/?p=101</link>
		<comments>http://bystyx.com/blog/?p=101#comments</comments>
		<pubDate>Wed, 31 Mar 2010 00:16:00 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[eco]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=101</guid>
		<description><![CDATA[*Edit: Here are the sketches from this project: design by Andrew Kim http://designfabulous.blogspot.com/2010/03/eco-coke-bottle-design.html]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm5.static.flickr.com/4057/4435622439_c089527019_o.jpg" border="0" alt="" width="615" /></p>
<div>*Edit: Here are the sketches from this project:</div>
<div><img src="http://farm5.static.flickr.com/4072/4456117302_954f9118e8_o.jpg" border="0" alt="" width="615" /></div>
<div>design by<strong> Andrew Kim</strong></div>
<div><a href="http://designfabulous.blogspot.com/2010/03/eco-coke-bottle-design.html">http://designfabulous.blogspot.com/2010/03/eco-coke-bottle-design.html</a></div>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=101</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod-proxy-core and SQF</title>
		<link>http://bystyx.com/blog/?p=97</link>
		<comments>http://bystyx.com/blog/?p=97#comments</comments>
		<pubDate>Mon, 29 Mar 2010 04:55:13 +0000</pubDate>
		<dc:creator>styx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[carp]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[load balance]]></category>
		<category><![CDATA[round-robin]]></category>
		<category><![CDATA[rr]]></category>
		<category><![CDATA[sqf]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://bystyx.com/blog/?p=97</guid>
		<description><![CDATA[mod-proxy-core and SQF mod-proxy-core has 3 different balancers for different needs. Round Robin, Shortest Queue First and CARP. We can categorize the balancers into two sections: load balancing by distribution (RR, SQF) load balancing by separation (CARP) Round Robin Round Robin (RR) is simple and straight forward. If you have 3 hosts A1 A2 A3 [...]]]></description>
			<content:encoded><![CDATA[<h3><a href="http://blog.lighttpd.net/articles/2006/11/14/mod-proxy-core-and-sqf" target="_blank">mod-proxy-core and SQF</a></h3>
<p>mod-proxy-core has 3 different balancers for different needs. Round Robin, Shortest Queue First and CARP.</p>
<p>We can categorize the balancers into two sections:</p>
<ul>
<li>load balancing by distribution (RR, SQF)</li>
<li>load balancing by separation (CARP)</li>
</ul>
<h4>Round Robin</h4>
<p>Round Robin (RR) is simple and straight forward.</p>
<p>If you have 3 hosts</p>
<ul>
<li>A1</li>
<li>A2</li>
<li>A3</li>
</ul>
<p>the first request goes to A1, the seconds to A2 and the third to A3. The forth request starts at A1 again.</p>
<p>We use a slightly different implementation. Instead of really going from A1 to A2 to A3, we take all active backends and pick one randomly. On average each host gets the same number of requests.</p>
<h4>Shortest Queue First</h4>
<p>RR has a little problem. If A1 is slower than A2 and A3, the fast backends will get the same number of requests as the A1.</p>
<p>SQF tries to take that into account and take the queue-length as the base for the balancing.</p>
<p>The first request goes to A1 and takes 10s to complete. Meanwhile we get 4 other requests which A2 and A3 execute in 2s.</p>
<p>After two seconds it looks like this:</p>
<ul>
<li>A1 needs 8 more seconds [q-len: 1]</li>
<li>A2 is free [q-len: 0]</li>
<li>A3 is free [q-len: 0]</li>
</ul>
<p>Request 3 goes to A2:</p>
<ul>
<li>A1 needs 8 more seconds [q-len: 1]</li>
<li>A2 needs 2 seconds [q-len: 1]</li>
<li>A3 is free [q-len: 0]</li>
</ul>
<p>and Request 4 goes to A3:</p>
<ul>
<li>A1 needs 8 more seconds [q-len: 1]</li>
<li>A2 needs 2 seconds [q-len: 1]</li>
<li>A3 needs 2 seconds [q-len: 1]</li>
</ul>
<p>If another request comes in now, we put it into the backlog.</p>
<h4>Benchmarks</h4>
<p>This had to be benchmarked. What a luck that I have enough hardware at home, so we have 4 boxes joining the ring:</p>
<ul>
<li>client (.23): a Mac Mini, 1.2GHz, 100Mbit</li>
<li>proxy (.27): AMD64 3000+, Linux 2.6.x, 1Gbit</li>
<li>backend-1 (.22): Intel P4 1.2GHz, WinXP 32-bit</li>
<li>backend-2 (.25): AMD64 X2, 3500+, Win2003 64-bit</li>
</ul>
<p>The backends are running Apache 2.2.x taken from the MSI, mod_status enabled.</p>
<p>The proxy is lighty 1.5.0-r1435 with mod-proxy-core:</p>
<pre>$SERVER["socket"] == ":1445" {
   proxy-core.protocol = "http"
#  proxy-core.balancer = "round-robin"
   proxy-core.balancer = "sqf"
   proxy-core.backends = ( "192.168.178.25:80", "192.168.178.22:8080" )
#  proxy-core.backends = ( "192.168.178.22:8080" )
#  proxy-core.backends = ( "192.168.178.25:80" )
   proxy-core.max-pool-size = 32
}</pre>
<p>The backends are serving the 44byte index.html which is in the htdocs/ folder by default.</p>
<p>The client is always running the same command:</p>
<pre>$ ab -k -n 100000 -c 16 <a href="http://192.168.178.27:1445/">http://192.168.178.27:1445/</a></pre>
<p>As a first test we only active .25, the dual core box:</p>
<pre>Requests per second:    2833.60 [#/sec] (mean)</pre>
<p>Only .22 [my 3yr old Centrino notebook] gives:</p>
<pre>Requests per second:    1249.45 [#/sec] (mean)</pre>
<p>Using RR will balance the request equally over both hosts. We expect at max the double request-rate of the slowest backend.</p>
<pre>balancer req/s req .22 req .25 %idle .27
RR       2122  50122   49896   50%
SQF      3213  30970   69048   25%</pre>
<p>You see how SQF takes the adjusts to the possibilities of the backend and balances nicely while RR is just doing its thing and results in alot less throughput in the end.</p>
<p>BTW: If keep-alive is disabled, the req/s drop from 3213 to 2678 req/s with SQF and from 2122 to 1835 for RR.</p>
<p>The proxy-server (our lighty) is using its CPU very well and I already found ways to optimize the proxy-code to use less CPU. It won’t affect the performance of this benchmark alot as the backends are at 100% already.</p>
]]></content:encoded>
			<wfw:commentRss>http://bystyx.com/blog/?feed=rss2&#038;p=97</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

