<?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>Chakkrit Tantithamthavorn&#039;s Official Personal Website &#187; subdomain</title>
	<atom:link href="http://www.klainfo.com/tag/subdomain/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klainfo.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 13:12:31 +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>[Apache] Create subdomain on localhost</title>
		<link>http://www.klainfo.com/2010/01/31/apache-create-subdomain-on-localhost/</link>
		<comments>http://www.klainfo.com/2010/01/31/apache-create-subdomain-on-localhost/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 18:15:53 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[subdomain]]></category>

		<guid isPermaLink="false">http://blog.klainfo.com/?p=602</guid>
		<description><![CDATA[ปกติแล้ว คนที่ทำเวบ ก็สร้าง subdomain ผ่าน direct admin ง่ายมาก แต่ถ้าอยากลองบน localhost จะทำยังไงดีหละ นั่งหาๆเหมือนกัน เลยจดไว้ดีกว่า กันลืม ลองดูวิธีนี้ละกันนะ ง่ายดี สำหรับตัวอย่างนี้ สมมติว่าสร้าง subdomain ชื่อว่า sub โดยมีไดเรคทอรี่อยู่ที่ /var/www/sub เริ่มจาก $ sudo vi /etc/apache2/sites-enabled/000-default เติมข้อความนี้ลงไป ServerAdmin admin@localhost DocumentRoot /var/www/sub ServerName sub.localhost ตามด้วยคำสั่ง $ sudo vi /etc/hosts เติมข้อความนี้ลงไป 127.0.0.1 localhost 127.0.0.1 sub.localhost ลองทดสอบดู ถ้าไม่ได้ให้ restart apache service ก่อนครับ $ sudo /etc/init.d/apache2 restart [...]]]></description>
			<content:encoded><![CDATA[<p>ปกติแล้ว คนที่ทำเวบ ก็สร้าง subdomain ผ่าน direct admin ง่ายมาก แต่ถ้าอยากลองบน localhost จะทำยังไงดีหละ นั่งหาๆเหมือนกัน เลยจดไว้ดีกว่า กันลืม ลองดูวิธีนี้ละกันนะ ง่ายดี<br />
สำหรับตัวอย่างนี้ สมมติว่าสร้าง subdomain ชื่อว่า sub โดยมีไดเรคทอรี่อยู่ที่ /var/www/sub<br />
เริ่มจาก</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-enabled<span style="color: #000000; font-weight: bold;">/</span>000-default</pre>
</div>
</div>
<p>เติมข้อความนี้ลงไป</p>
<pre>
ServerAdmin admin@localhost
DocumentRoot /var/www/sub
ServerName sub.localhost
</pre>
<p>ตามด้วยคำสั่ง</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</pre>
</div>
</div>
<p>เติมข้อความนี้ลงไป</p>
<pre>
127.0.0.1    localhost
127.0.0.1    sub.localhost
</pre>
<p>ลองทดสอบดู ถ้าไม่ได้ให้ restart apache service ก่อนครับ</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre>
</div>
</div>
<p>เสร็จแล้วๆๆๆ อิอิ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2010/01/31/apache-create-subdomain-on-localhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.klainfo.com @ 2012-02-06 18:25:12 -->
