<?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/"
	 xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>letsencrypt &#8211; PhalconHost Blog</title>
	<atom:link href="https://blog.phalconhost.com/tag/letsencrypt/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.phalconhost.com</link>
	<description>PhalconHost Blog</description>
	<lastBuildDate>Wed, 02 Nov 2022 06:41:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>วิธีติดตั้ง Let&#8217;s Encrypt ในระบบ DirectAdmin บน CentOS 6.8</title>
		<link>https://blog.phalconhost.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-letsencrypt-%e0%b9%83%e0%b8%99%e0%b8%a3%e0%b8%b0%e0%b8%9a%e0%b8%9a-directadmin-%e0%b8%9a%e0%b8%99-ce/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 16 Nov 2016 04:14:28 +0000</pubDate>
				<category><![CDATA[Server, VPS]]></category>
		<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[letsencrypt]]></category>
		<guid isPermaLink="false">http://blog.phalconhost.com/?p=443</guid>

					<description><![CDATA[<p>วิธีการทำให้เว็บไซด์รองรับ https ปกติจะต้องซื้อ SSL Certificate ในราคาแบบรายปี มีตั้งแต่หลักร้อย หลักพัน หลักหมื่น หลักแสน ก็ว่ากันไป แต่สำหรับปัจจุบัน มีเทคโนโลยีที่สามารถทำให้เว็บไซด์รองรับ https โดยใช้ Let&#8217;s Encrypt ซึ่งเป็น SSL Certificate แบบฟรี ไม่เสียค่าใช้จ่าย และติดตั้งง่ายๆ บนระบบจัดการโฮสติ้ง DirectAdmin ดังนี้ ใส่ค่าเข้าไปใน config ของ DirectAdmin โดยการเปิดไฟล์ directadmin.conf ขึ้นมาก่อน yum -y update vi /usr/local/directadmin/conf/directadmin.conf จากนั้น เพิ่มตัวแปรนี้ ในบรรทัดท้ายสุด enable_ssl_sni=1 letsencrypt=1 แก้ปัญหา การรันคำสั่งที่ติดปัญหาเรื่อง UTF-8 vi /etc/environment ใส่ค่าเหล่านี้เข้าไป LANG=en_US.utf-8 LC_ALL=en_US.utf-8 ต่อไป สร้างโฟลเดอร์สำหรับเก็บไฟล์ที่ถูกสร้างขึ้น ขณะสร้าง certificate [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.phalconhost.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-letsencrypt-%e0%b9%83%e0%b8%99%e0%b8%a3%e0%b8%b0%e0%b8%9a%e0%b8%9a-directadmin-%e0%b8%9a%e0%b8%99-ce/">วิธีติดตั้ง Let&#8217;s Encrypt ในระบบ DirectAdmin บน CentOS 6.8</a> appeared first on <a rel="nofollow" href="https://blog.phalconhost.com">PhalconHost Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="1024" height="536" src="//i0.wp.com/blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_-1024x536.png" alt="" class="wp-image-679" srcset="https://blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_-1024x536.png 1024w, https://blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_-300x157.png 300w, https://blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_-768x402.png 768w, https://blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>วิธีการทำให้เว็บไซด์รองรับ https ปกติจะต้องซื้อ SSL Certificate ในราคาแบบรายปี มีตั้งแต่หลักร้อย หลักพัน หลักหมื่น หลักแสน ก็ว่ากันไป แต่สำหรับปัจจุบัน มีเทคโนโลยีที่สามารถทำให้เว็บไซด์รองรับ https โดยใช้ Let&#8217;s Encrypt ซึ่งเป็น SSL Certificate แบบฟรี ไม่เสียค่าใช้จ่าย</p>



<span id="more-443"></span>



<p>และติดตั้งง่ายๆ บนระบบจัดการโฮสติ้ง DirectAdmin ดังนี้</p>



<p>ใส่ค่าเข้าไปใน config ของ DirectAdmin โดยการเปิดไฟล์ directadmin.conf ขึ้นมาก่อน</p>



<pre class="wp-block-preformatted">yum -y update
vi /usr/local/directadmin/conf/directadmin.conf
</pre>



<p>จากนั้น เพิ่มตัวแปรนี้ ในบรรทัดท้ายสุด</p>



<pre class="wp-block-preformatted">enable_ssl_sni=1
letsencrypt=1
</pre>



<p>แก้ปัญหา การรันคำสั่งที่ติดปัญหาเรื่อง UTF-8</p>



<pre class="wp-block-preformatted">vi   /etc/environment</pre>



<p>ใส่ค่าเหล่านี้เข้าไป</p>



<pre class="wp-block-preformatted">LANG=en_US.utf-8
LC_ALL=en_US.utf-8
</pre>



<p>ต่อไป สร้างโฟลเดอร์สำหรับเก็บไฟล์ที่ถูกสร้างขึ้น ขณะสร้าง certificate ของ Let&#8217;s Encrypt แบบชั่วคราว</p>



<pre class="wp-block-preformatted">mkdir -p /var/www/html/.well-known/acme-challenge
chown -R webapps.webapps /var/www/html/.well-known
chmod -R 0755 /var/www/html/.well-known/
ll -al  /var/www/html/
</pre>



<p>แก้ปัญหาเรื่องการสั่ง gen ssl แล้วติดเรื่อง license ไม่ตรงกับเวอร์ชั่น</p>



<p>โดยเปิดไฟล์ letsencrypt.sh ขึ้นมาแก้ไข</p>



<pre class="wp-block-preformatted">vi /usr/local/directadmin/scripts/letsencrypt.sh
</pre>



<p>จากนั้นค้นหาบรรทัดที่มี LICENSE=&#8221;xxxxxx-2015.pdf&#8221; และลบออก จากนั้นใส่คำสั่งนี้ไปแทน</p>



<pre class="wp-block-preformatted">LICENSE="https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf"
</pre>



<p>สร้าง Alias สำหรับการเรียก .wel-known ของแต่ละโดเมน</p>



<pre class="wp-block-preformatted">vi /etc/httpd/conf/extra/httpd-alias-custom.conf
</pre>



<p>ใส่คำสั่งนี้เข้าไปในไฟล์ httpd-alias-custom.conf</p>



<pre class="wp-block-preformatted">Alias /.well-known "/var/www/html/.well-known"
</pre>



<p>ทำการดึงข้อมูลในไฟล์ httpd-alias-custom.conf มารวมเป็นค่า config ของ apache ของเรา โดยการเปิดไฟล์ httpd-includes.conf ขึ้นมาก่อน</p>



<pre class="wp-block-preformatted">vi /etc/httpd/conf/extra/httpd-includes.conf
</pre>



<p>ใส่คำสั่งนี้เข้าไปในไฟล์ httpd-includes.conf</p>



<pre class="wp-block-preformatted">Include /etc/httpd/conf/extra/httpd-alias-custom.conf
</pre>



<p>สั่ง restart apache และ directadmin โดยรันคำสั่ง</p>



<pre class="wp-block-preformatted">service directadmin restart
service httpd restart
</pre>



<p>เพียงเท่านี้ DirectAdmin ก็จะรองรับการสั่ง gen SSL ของ Let&#8217;s Encrypt เพื่อทำให้เว็บไซด์เป็นแบบ https โดยไม่เสียเงิน (ฟรี) เรียบร้อยครับ</p>
<p>The post <a rel="nofollow" href="https://blog.phalconhost.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-letsencrypt-%e0%b9%83%e0%b8%99%e0%b8%a3%e0%b8%b0%e0%b8%9a%e0%b8%9a-directadmin-%e0%b8%9a%e0%b8%99-ce/">วิธีติดตั้ง Let&#8217;s Encrypt ในระบบ DirectAdmin บน CentOS 6.8</a> appeared first on <a rel="nofollow" href="https://blog.phalconhost.com">PhalconHost Blog</a>.</p>
]]></content:encoded>
					
		
		
		
		<media:thumbnail url="https://blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_-150x150.png" />
		<media:content url="https://blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_.png" medium="image">
			<media:title type="html">8.cover</media:title>
			<media:thumbnail url="https://blog.phalconhost.com/wp-content/uploads/2019/03/8.cover_-150x150.png" />
		</media:content>
	</item>
	</channel>
</rss>
