<?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>Daily logs &#187; Linux</title>
	<atom:link href="http://blog.pnyet.web.id/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.pnyet.web.id</link>
	<description>A Nobody trying to become a Somebody</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:26:10 +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>PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp)</title>
		<link>http://blog.pnyet.web.id/2011/12/04/php-warning-unknown-failed-write-session-data-files-verify-current-setting-session-save_path-correct-tmp.html</link>
		<comments>http://blog.pnyet.web.id/2011/12/04/php-warning-unknown-failed-write-session-data-files-verify-current-setting-session-save_path-correct-tmp.html#comments</comments>
		<pubDate>Sun, 04 Dec 2011 02:21:50 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[Solved]]></category>
		<category><![CDATA[Web Server]]></category>

		<guid isPermaLink="false">http://blog.pnyet.web.id/?p=731</guid>
		<description><![CDATA[This article referring to another article that not published yet, I had some issue with session.save_path in php-fpm setup. For security improvements  I want to make PHP execute under individual user accounts insted of a system user like nginx (default www user and group). In apache environments I can use suPHP or suExec and in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F12%2F04%2Fphp-warning-unknown-failed-write-session-data-files-verify-current-setting-session-save_path-correct-tmp.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F12%2F04%2Fphp-warning-unknown-failed-write-session-data-files-verify-current-setting-session-save_path-correct-tmp.html&amp;source=pnyet&amp;style=normal&amp;service=bit.ly&amp;hashtags=Error,nginx,Solved,Web+Server&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pnyet.web.id/wp-content/uploads/2011/12/error_fpm.png"><img class="size-medium wp-image-733 alignleft" title="error_fpm" src="http://blog.pnyet.web.id/wp-content/uploads/2011/12/error_fpm-300x182.png" alt="" width="300" height="182" /></a>This article referring to another article that not published yet, I had some issue with session.save_path in php-fpm setup. For security improvements  I want to make PHP execute under individual user accounts insted of a system user like nginx (default www user and group). In apache environments I can use suPHP or suExec and in Nginx I can use php-fpm with custom &#8220;pool&#8221; each web server and that makes PHP scripts executed by owner and groups that describe in each pool. <span id="more-731"></span><br />
But I got the following error message when try to installing some cms, and how to solve?</p>
<p>2011/12/03 23:49:34 [error] 1330#0: *126 FastCGI sent in stderr: &#8220;PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">setting</a> of session.save_path is correct (/tmp) in Unknown on line 0&#8243; while reading upstream, client: 192.168.0.13, server: localhost, request: &#8220;GET /lgz/src/index.php HTTP/1.1&#8243;, upstream: &#8220;fastcgi://127.0.0.1:9000&#8243;, host: &#8220;172.16.0.1&#8243;, referrer: &#8220;http://172.16.0.1/lgz/src/login.php&#8221;<br />
2011/12/03 23:54:34 [error] 1333#0: *208 FastCGI sent in stderr: &#8220;PHP Warning:  Unknown: open(/tmp/sess_ig3mpbuc2fuhjt1p4ibpe3maa4, O_RDWR) failed: Permission denied (13) in Unknown on line 0&#8243; while reading upstream, client: 192.168.0.13, server: localhost, request: &#8220;GET /lgz/src/index.php HTTP/1.1&#8243;, upstream: &#8220;fastcgi://127.0.0.1:9000&#8243;, host: &#8220;172.16.0.1&#8243;, referrer: &#8220;http://172.16.0.1/lgz/src/login.php?referer=%2Flgz%2Fsrc%2Findex.php&#8221;<br />
2011/12/03 23:54:34 [error] 1333#0: *208 FastCGI sent in stderr: &#8220;PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">setting</a> of session.save_path is correct (/tmp) in Unknown on line 0&#8243; while reading upstream, client: 192.168.0.13, server: localhost, request: &#8220;GET /lgz/src/index.php HTTP/1.1&#8243;, upstream: &#8220;fastcgi://127.0.0.1:9000&#8243;, host: &#8220;172.16.0.1&#8243;, referrer: &#8220;http://172.16.0.1/lgz/src/login.php?referer=%2Flgz%2Fsrc%2Findex.php&#8221;</p>
<p>I&#8217;m sure that the /tmp permission are correct, but in fact I can&#8217;t use cookies to process authentication method. The problem is in my pool configuration and I need to add custom php rules here:</p>
<p>php_admin_value[session.save_handler] = files<br />
php_admin_value[session.save_path] = &#8220;/tmp&#8221;<br />
php_admin_value[session.use_cookies] = 1<br />
php_admin_value[session.name] = PHPSESSID</p>
<p>After uncommented the lines in above, php scripts was success to execute and allowed use cookies in /tmp. This is stupid mind because I haven&#8217;t read the manpage before start using pool even my another websites running well, it&#8217;s habit (trying before RTFM, and RTFM after see an error). Below is an example of my php-fpm pool configuration:</p>
<p>[site1]<br />
listen = 127.0.0.1:9000<br />
listen.backlog = -1<br />
listen.allowed_clients = 127.0.0.1<br />
;listen.owner = nginx<br />
;listen.group = nginx<br />
;listen.mode = 0666<br />
user = site1<br />
group = site1<br />
pm = dynamic<br />
pm.max_children = 50<br />
pm.start_servers = 20<br />
pm.min_spare_servers = 5<br />
pm.max_spare_servers = 35<br />
pm.max_requests = 200<br />
access.log = log/$pool.access.log<br />
access.format = %R &#8211; %u %t &#8220;%m %r%Q%q&#8221; %s %f %{mili}d %{kilo}M %C%%<br />
;request_terminate_timeout = 0<br />
request_slowlog_timeout = 20<br />
slowlog = log/$pool.log.slow<br />
env[HOSTNAME] = $HOSTNAME<br />
env[PATH] = /usr/local/bin:/usr/bin:/bin<br />
env[TMP] = /tmp<br />
env[TMPDIR] = /tmp<br />
env[TEMP] = /tmp</p>
<p>#add your custom php.ini<br />
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f webmaster@site1.pnyet.web.id<br />
php_admin_value[memory_limit] = 256M<br />
php_admin_value[session.save_handler] = files<br />
php_admin_value[session.save_path] = &#8220;/tmp&#8221;<br />
php_admin_value[session.use_cookies] = 1<br />
php_admin_value[session.name] = PHPSESSID</p>
<p>Don&#8217;t forget to restart php-fpm after change the configuration :)</p>
<p style="text-align: right;"><em>reference: http://http://php-fpm.org/wiki</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pnyet.web.id/2011/12/04/php-warning-unknown-failed-write-session-data-files-verify-current-setting-session-save_path-correct-tmp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Time on Linux</title>
		<link>http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html</link>
		<comments>http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html#comments</comments>
		<pubDate>Thu, 18 Aug 2011 16:59:50 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[setting]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.pnyet.web.id/?p=651</guid>
		<description><![CDATA[Actually this article was posted in here and I&#8217;ll repost this article because some times my old blog is unavailable. By the way, how important to setting or configure date and time in your linux machine?Date and time is very important in every operating system, because without time that configured properly it&#8217;s hard to read [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F08%2F18%2Fsetting-time-on-linux.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F08%2F18%2Fsetting-time-on-linux.html&amp;source=pnyet&amp;style=normal&amp;service=bit.ly&amp;hashtags=Linux,setting,Tips&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pnyet.web.id/wp-content/uploads/2011/08/setting-time-date.png"><img class="alignleft size-medium wp-image-652" title="Setting time" src="http://blog.pnyet.web.id/wp-content/uploads/2011/08/setting-time-date-285x300.png" alt="" width="285" height="300" /></a>Actually this article was posted in <a title="pnyet.web.id" href="http://pnyet.web.id" target="_blank">here</a> and I&#8217;ll repost this article because some times my old blog is unavailable. By the way, how <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">important</a> to <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">setting</a> or configure date and time in your <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">linux</a> machine?<span id="more-651"></span>Date and time is very <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">important</a> in every operating system, because without time that configured properly it&#8217;s hard to read log files.</p>
<p>In other case, server doesn&#8217;t work properly without a valid time if in there running some services that required valid date and time (example, hourly access list, monitoring system, log server, <a href="http://blog.pnyet.web.id/2012/01/23/banyak-situs-yang-terancam-sopa-dan-pipa.html">internet</a> portal). So what?</p>
<p>How to <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">setting</a> date and time on <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">linux</a> machine? Configure date and time on <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">linux</a> machine is very simple and easy, just one step like below:</p>
<p># date -s ‘MM/DD/YYYY HH:MM:SS’ &lt;– change with actual date and time eg: ‘08/18/2011 23:32:00′<br />
# date -s 081823322011<br />
# hwclock &#8211;utc &#8211;systohc</p>
<p>That&#8217;s all, and your date?</p>
<p># date<br />
Thu Aug 18 23:34:23 WIT 2011</p>
<p>Just few steps and safe your life :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solved Ubuntu icons close minimize maximize disappeared!</title>
		<link>http://blog.pnyet.web.id/2011/07/19/solved-ubuntu-icons-close-minimize-maximize-disappeared.html</link>
		<comments>http://blog.pnyet.web.id/2011/07/19/solved-ubuntu-icons-close-minimize-maximize-disappeared.html#comments</comments>
		<pubDate>Mon, 18 Jul 2011 18:20:43 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dekstop]]></category>
		<category><![CDATA[Solved]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.pnyet.web.id/?p=644</guid>
		<description><![CDATA[Tonight I have a plan to maintenance two servers in my office, but my laptop seems not good, sometimes desktop is freeze and can&#8217;t click anything, so I have to restart for several times. Ok, let&#8217;s change back from Unity to Gnome classic, and after changed to Gnome classic my desktop seems good. Something stupid [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F07%2F19%2Fsolved-ubuntu-icons-close-minimize-maximize-disappeared.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F07%2F19%2Fsolved-ubuntu-icons-close-minimize-maximize-disappeared.html&amp;source=pnyet&amp;style=normal&amp;service=bit.ly&amp;hashtags=dekstop,Linux,Solved,ubuntu&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pnyet.web.id/wp-content/uploads/2011/07/zompiz_logo.png"><img class="alignleft size-medium wp-image-646" title="Compiz Logo" src="http://blog.pnyet.web.id/wp-content/uploads/2011/07/zompiz_logo-300x250.png" alt="Compiz Logo" width="300" height="250" /></a>Tonight I have a plan to maintenance two servers in my office, but my laptop seems not good, sometimes desktop is freeze and can&#8217;t click anything, so I have to restart for several times. Ok, let&#8217;s change back from Unity to Gnome classic, and after changed to Gnome classic my desktop seems good. Something stupid make me broken, I&#8217;ve enable some effect in Compiz config manager and make some menus disappeared!. Where is &#8220;close, minimize, maximize&#8221; window menu?<span id="more-644"></span></p>
<p>Well, my plan has changed from maintenance servers to recovering my laptop, it&#8217;s so tiring me, because last time I got same problem my stupid solutions is replace my profile with a new profile finally I got my window menu back, but I&#8217;m missing my email settings, wine config, and other utilities <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">setting</a> :mrgreen: . Ok, I&#8217;m triying to restore the compiz <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">setting</a> to default but can&#8217;t solve the problem. So what happen with my window decoration? Hm&#8230;, window decoration, yeay &#8220;Window Decoration&#8221; in Compiz config may be related to this problem&#8230;</p>
<p>I&#8217;ve checked Window Decoration in compiz config and found that this menu was disabled, what I&#8217;m done? Ok, let&#8217;s try to enable Window Decoration like this (see picture):</p>
<p style="text-align: center;"><a href="http://blog.pnyet.web.id/wp-content/uploads/2011/07/compiz-dec1.png"><img class="size-full wp-image-645 aligncenter" title="Window decoration" src="http://blog.pnyet.web.id/wp-content/uploads/2011/07/compiz-dec1.png" alt="Window decoration" width="648" height="245" /></a></p>
<p>After enabled Window Decoration in Compiz Config &#8211; Effects my desktop working smoothly :)</p>
<p>Thank you Sleppy&#8230;&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pnyet.web.id/2011/07/19/solved-ubuntu-icons-close-minimize-maximize-disappeared.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MySQL from source</title>
		<link>http://blog.pnyet.web.id/2011/04/15/installing-mysql-from-source.html</link>
		<comments>http://blog.pnyet.web.id/2011/04/15/installing-mysql-from-source.html#comments</comments>
		<pubDate>Thu, 14 Apr 2011 23:56:56 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://blog.pnyet.web.id/?p=581</guid>
		<description><![CDATA[Beberapa hari lalu saya melakukan installasi MySQL Community Server (Open Source) menggunakan source di CentOS 5.5 x86_64bit dan akan digunakan sebagai backend dari MySQL Load Balancing. MySQL yang saya gunakan adalah versi 5.1.56 (Community) karena beberapa kali saya menggunakan MySQL versi 5.5.11 mengalami masalah kompatibiltas dengan beberapa aplikasi yang sudah running :mrgreen: . Beberapa hal [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F04%2F15%2Finstalling-mysql-from-source.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F04%2F15%2Finstalling-mysql-from-source.html&amp;source=pnyet&amp;style=normal&amp;service=bit.ly&amp;hashtags=compile,Database,MySQL,server,source&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pnyet.web.id/wp-content/uploads/2011/04/mysql-log.jpg"><img class="alignleft size-full wp-image-583" title="mysql-log" src="http://blog.pnyet.web.id/wp-content/uploads/2011/04/mysql-log.jpg" alt="" width="300" height="225" /></a>Beberapa hari lalu saya melakukan installasi MySQL Community Server (Open Source) menggunakan source di CentOS 5.5 x86_64bit dan akan digunakan sebagai backend dari MySQL Load Balancing. MySQL yang saya gunakan adalah versi 5.1.56 (Community) karena beberapa kali saya menggunakan MySQL versi 5.5.11 mengalami masalah kompatibiltas dengan beberapa aplikasi yang sudah running :mrgreen: .</p>
<p><span id="more-581"></span>Beberapa hal yang saya lakukan sebelum meng-compile dan menginstal MySQL adalah mempersiapkan mesin agar sesuai dengan kebutuhan, metode yang saya gunakan untuk installasi operating system adalah mode minimal dan setelah itu menentukan struktur direktori yang akan digunakan untuk penyimpanan data, rencananya data MySQL akan saya simpan di /home/mysql kemudian file instalasi sendiri akan saya taruh di /usr/local/mysql.  See below:</p>
<p>Install dependencies yang akan digunakan oleh MySQL maupun development tools:</p>
<p># yum -y install gcc make automake glibc ncurses ncurses-devel</p>
<p>Kemudian <a href="http://blog.pnyet.web.id/2012/01/23/banyak-situs-yang-terancam-sopa-dan-pipa.html">download</a> source MySQL dari http://mysql.com/downloads/mysql/5.1.html (pilih source code), ekstrak, compile dan install:</p>
<p># wget ftp://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.1/mysql-5.1.56.tar.gz<br />
# tar -zxvf mysql-5.1.56.tar.gz<br />
# cd mysql-5.1.56<br />
# ./configure &#8211;prefix=/usr/local/mysql &#8211;datadir=/home/mysql &#8211;with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock &#8211;localstatedir=/home/mysql/data<br />
# make<br />
# make install</p>
<p>Selanjutnya buat symbolik link dari /usr/local/mysql/bin ke /usr/bin/</p>
<p># ln -s /usr/local/mysql/bin/* /usr/bin/</p>
<p>Next, copy file init MySQL agar dapat dilakukan start melalui /etc/init.d atau service dan ubah permissionnya supaya executable:</p>
<p># cp /home/mysql/mysql/mysql.server /etc/init.d/mysql<br />
# chmod +x /etc/init.d/mysql</p>
<p>Selanjutnya copy file konfigurasi mysql dan sesuaikan dengan kebutuhan, karena terdapat beberapa file konfigurasi untuk level yang berbeda-beda (small &#8211; medium &#8211; large), beberapa pilihannya adalah berikut:</p>
<p>my-huge.cnf<br />
my-innodb-heavy-4G.cnf<br />
my-large.cnf<br />
my-medium.cnf<br />
my-small.cnf</p>
<p>Untuk penjelasan detail mengenai file-file konfigurasi diatas dapat dibaca didalam file-file tersebut, saya sendiri menggunakan large :d</p>
<p># cp /home/mysql/mysql/my-large.cnf /etc/my.cnf</p>
<p>Next, buat MySQL privileges yang didalamnya termasuk host, user,tables_priv, columns_priv, dan func tables dengan menjalankan script:</p>
<p># /usr/local/mysql/bin/mysql_install_db</p>
<p>Sampai proses ini, intalasi MySQL dari source telah selesai dan MySQL server siap digunakan, jangan lupa start servicenya  dan buat agar service MySQL running di run level 3 5 :p</p>
<p># chkconfig &#8211;level 35 mysql on<br />
# /etc/init.d/mysql start</p>
<p>Dari command diatas akan terdapat notifikasi &#8220;Starting MySQL. SUCCESS!&#8221;, proses MySQL yang sedang berjalan juga dapat dilihat melalui:</p>
<p># ps aux |grep mysql<br />
root     19716  0.0  0.0  63816  1332 pts/0    S    13:45   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe &#8211;datadir=/home/mysql &#8211;pid-file=/home/mysql/srv15.varnion.com.pid<br />
mysql    19804  0.0  0.1 310996  5044 pts/0    Sl   13:45   0:00 /usr/local/mysql/libexec/mysqld &#8211;basedir=/usr/local/mysql &#8211;datadir=/home/mysql &#8211;user=mysql &#8211;log-error=/home/mysql/srv15.varnion.com.err &#8211;pid-file=/home/mysql/srv15.varnion.com.pid &#8211;socket=/usr/local/mysql/tmp/mysql.sock &#8211;port=3306</p>
<p>Nah, sampai disini diharapkan tidak ada masalah dikemudian hari dari project mysql cluster load balancing dapat dilanjutkan..</p>
<p>Hope this useful :d</p>
<p><em>referensi: http://dev.mysql.com/doc/refman/5.1/en/source-installation.html</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pnyet.web.id/2011/04/15/installing-mysql-from-source.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Konfigurasi IPv6 di NGINX</title>
		<link>http://blog.pnyet.web.id/2011/02/27/konfigurasi-ipv6-di-nginx.html</link>
		<comments>http://blog.pnyet.web.id/2011/02/27/konfigurasi-ipv6-di-nginx.html#comments</comments>
		<pubDate>Sat, 26 Feb 2011 20:32:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[Web Server]]></category>

		<guid isPermaLink="false">http://blog.pnyet.web.id/?p=551</guid>
		<description><![CDATA[Sehubungan dengan ditambahkannya IPv6 di server saya, hal yang harus segera saya lakukan adalah dengan meng-enable IPv6 di webserver (NGINX) agar semua domain lebih cihui dengan menggunakan IPv6. Saat ini banyak organisasi telekomunikasi, teknologi informasi yang telah mengaplikasikan IPv6 untuk keperluan sehari-hari mereka, begitu juga dengan corporate tempat saya bekerja yang sedang melakukan improvisasi IPv6 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F02%2F27%2Fkonfigurasi-ipv6-di-nginx.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pnyet.web.id%2F2011%2F02%2F27%2Fkonfigurasi-ipv6-di-nginx.html&amp;source=pnyet&amp;style=normal&amp;service=bit.ly&amp;hashtags=Apache,compile,ipv6,nginx,Web+Server&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Sehubungan dengan ditambahkannya IPv6 di server saya, hal yang harus segera saya lakukan adalah dengan meng-enable IPv6 di webserver (NGINX) agar semua domain lebih cihui dengan menggunakan IPv6. Saat ini banyak organisasi telekomunikasi, teknologi informasi yang telah mengaplikasikan IPv6 untuk keperluan sehari-hari mereka, begitu juga dengan corporate tempat saya bekerja yang sedang melakukan improvisasi IPv6 kedalam infrastrukturnya.</p>
<p>NGINX merupakan alternatif web server dari apache yang sudah membumi, namun semenjak saya menggunakan nginx saya cukup terkesan dengan performa NGINX karena memang jauh lebih keren daripada apache, meski untuk urusan modul apache jauh lebih lengkap. NGINX sudah mendukup IPv6 namun secara default module ini harus disertakan pada saat melakukan compile package. Berikut ini adalah step by step bagaimana mengkonfigurasi NGINX dengan dukungan IPv6 dan juga virtualhost dengan menggunakan IPv6&#8230;</p>
<p>Langkah pertama adalah memastikan apakah NGINX yang diinstall sudah mendukung IPv6?</p>
<p>$ /usr/sbin/nginx -V<br />
nginx version: nginx/0.8.54<br />
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)<br />
TLS SNI support disabled<br />
configure arguments: &#8211;prefix=/usr/local/nginx&#8230;&#8230;&#8230;. <strong> &#8211;with-ipv6</strong></p>
<p>Jika terdapat &#8220;&#8211;with-ipv6&#8243; maka nginx telah mendukung IPv6 dan jika tidak ditemukan maka kita dapat melakukan compile ulang dengan menambahkan &#8211;with-ipv6 pada saat configure. Selanjutnya adalah mencoba melakukan <a href="http://blog.pnyet.web.id/2011/08/18/setting-time-on-linux.html">setting</a> virtualhost agar menggunakan ipv6, langkahnya adalah dengan mengedit konfigurasi virtualhost dengan menambahkan binding port agar listen ke ipv6.</p>
<p>$ sudo vi /usr/local/nginx/conf/vhost/default</p>
<p>server {<br />
listen  80;<br />
listen [::]:80 default ipv6only=on;<br />
listen [::]:443 default ipv6only=on;<br />
server_name _;</p>
<p>&#8220;default ipv6only=on&#8221; adalah agar port tesebut hanya listen pada ipv6 sehingga tidak bentrok dengan port 80 yang digunakan ipv4, jika default upv4only=on dihilangkan maka akan muncul pesan error seperti dibawah ini:</p>
<p><em>Starting nginx: [emerg]: bind() to [::]:80 failed (98: Address already in use)</em><br />
<em>[emerg]: bind() to 0.0.0.0:443 failed (98: Address already in use)</em><br />
<em>[emerg]: bind() to [::]:80 failed (98: Address already in use)</em><br />
<em>[emerg]: bind() to 0.0.0.0:443 failed (98: Address already in use)</em><br />
<em>[emerg]: bind() to [::]:80 failed (98: Address already in use)</em><br />
<em>[emerg]: bind() to 0.0.0.0:443 failed (98: Address already in use)</em></p>
<p>Oke, next adalah konfigurasi virtualhost untuk spesifik domain agar listen ke ipv6 dan konfigurasinya seperti dibawah ini:</p>
<p>server {<br />
listen      blog.pnyet.web.id:80;<br />
listen [2406:2400:dc7f::d4e7:130]:80;<br />
server_name  blog.pnyet.web.id;</p>
<p>server {<br />
listen      blog.pnyet.web.id:443;<br />
listen [2406:2400:dc7f::d4e7:130]:443;<br />
server_name  blog.pnyet.web.id;</p>
<p>Simpan konfigurasi tersebut diatas dan lihat apakah binding http port dan https port sudah listen ke IPv6, jika sudah maka hasilnya akan seperti ini:</p>
<p>tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      32580/nginx.conf<br />
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      32580/nginx.conf<br />
tcp        0      0 :::80                       :::*                        LISTEN      32580/nginx.conf<br />
tcp        0      0 :::443                      :::*                        LISTEN      32580/nginx.conf</p>
<p>Nah, dari tulisan ini saya harapkan agar IPv6 lebih dikenali dan diminati karena semakin menipisnya Ipv4 seperti ozon dibumi :p</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pnyet.web.id/2011/02/27/konfigurasi-ipv6-di-nginx.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

