4 กุมภาพันธ์ 2555
ขอขอบคุณ พี่โดม (โดม เจริญยศ), คุณ Donga (ถนอมทรัพย์ นพบูรณ์), คุณ เริงฤทธิ์ (Rerngrit Rakkanittakorn), และคุณ kenggg (ปฏิพัทธ์ สุสำเภา) ที่ได้หย่อนสตางค์สนับสนุนการทำงานซอฟต์แวร์เสรีของผม
แต่ละท่านต่างก็กำลังร่วมเดินในเส้นทางซอฟต์แวร์เสรีและโอเพนซอร์สด้วยกัน ขอให้ประสบความสำเร็จตามที่มุ่งหวังนะครับ
ขอขอบคุณเป็นพิเศษสำหรับพี่โดมที่ได้เชิญชวนใน Facebook ให้ร่วมกัน donate ให้ผมครับ
โดย noreply@blogger.com (Thep) ณ 4 กุมภาพันธ์ 2555 12:33 +0700
3 กุมภาพันธ์ 2555
๏ มาจะกล่าวบทไป
บั๊กหนึ่งใน ThaiLaTeX เล็กนักหนา
เพียงวูบวับขยับปีกกรีดกรายมา
เกิดลมพาถาโถมโพยมบน ฯ
จากที่ได้เขียนถึง ปัญหาอัญประกาศ ใน ThaiLaTeX ไปเมื่อปลายธันวา นับจากวันนั้นถึงวันนี้ เวลาว่างของผมก็หมดไปกับการแก้ ThaiLaTeX และสิ่งที่เกี่ยวข้อง โดยบั๊กนี้ได้กลายเป็นผีเสื้อกระพือปีกที่ทำให้เกิดผลพวงเป็นพายุใหญ่ได้ทีเดียว
เริ่มจาก:
- พบว่าลำดับ `` และ '' ในเอกสาร ThaiLaTeX ไม่ได้มีการแปลงเป็นอัญประกาศคู่ แต่ยังคงรูปเป็นอัญประกาศเดี่ยวสองตัวเหมือนเดิม ซึ่งพบว่าปัญหาอยู่ที่ฟอนต์
- ระหว่างตรวจสอบปัญหาในกฎ ligkern ของ virtual font ก็พบว่ามีลำดับอื่นที่ยังไม่มีการแปลงเช่นกัน เช่น ?` (¿), !` (¡), \dag (†), \ddag (‡) ฯลฯ ดังที่กล่าวไปแล้วใน blog ก่อน
- ขณะทดสอบผลการแก้กฎ ligkern ก็พบว่า swath ไปแทรกรหัสแบ่งคำตรงกลางระหว่างลำดับ `` กลายเป็น `{\wbr}` ในบางกรณี
- ก่อนจะลงมือแก้ swath ก็ชักทนปวดหัวกับซอร์สที่อ่าน (โคตร) ยากของ swath ไม่ไหว จึงจัดระเบียบซอร์สเสียใหม่ ตั้งแต่ใช้เครื่องมือจัดสไตล์ของซอร์สอัตโนมัติแล้วมาปรับแต่งด้วยมือทีหลัง ปรับเปลี่ยนโครงสร้าง ตัดตัวแปรหรือ member ที่ไม่จำเป็น ซึ่งกลายเป็น commit ชุดใหญ่ คือประมาณ 40 commit ใน 4 วัน ส่งท้ายปีเก่า หลังจากนั้นจึงได้แกะและแก้บั๊กที่ต้องการ และปรับโค้ดต่ออีกนิดหน่อย
- กลับมาที่ ThaiLaTeX เอง เพื่อจะทดสอบฟอนต์ต่าง ๆ จึงมีการปรับเปลี่ยนเอกสารทดสอบ (teststd.tex) ให้รวมลำดับอักษรพิเศษด้วย แต่เพื่อความสะดวกในการปรับแก้ จึงจัดโครงสร้างเอกสารใหม่เสียก่อนโดยใช้แมโคร แล้วจึงแก้เพิ่ม
- กลับมาแก้ฟอนต์ที่เหลือต่อ โดยหลังจากที่ทดสอบกับฟอนต์ Norasi ที่มี glyph ค่อนข้างครบแล้ว ก็จำเป็นต้องไล่เพิ่ม glyph พิเศษทั้งหมดที่ lthenc.def ตัวใหม่รองรับในฟอนต์ที่เหลืออีก 11 family ในชุด tlwg ซึ่ง glyph ที่ขาดก็มากบ้างน้อยบ้างแล้วแต่ฟอนต์
- หลังจากเพิ่ม glyph ที่จำเป็นสำหรับ LaTeX แล้ว ก็จำเป็นต้องเพิ่ม glyph ละตินที่เหลือด้วย มิฉะนั้นการแสดงผลบนเดสก์ท็อปก็จะแหว่งไป ซึ่งปริมาณ glyph ที่เพิ่มนั้นเยอะกว่าชุด LaTeX หลายเท่า
- การเพิ่ม glyph ละติน มีบางฟอนต์ที่ต้องวาดเพิ่มเอง ไม่สามารถหยิบยืมจากฟอนต์อื่นได้ ก็จำเป็นต้องดูขนาดของเส้นจากอักษรอังกฤษที่มี ซึ่งทำให้พบว่ามีบางฟอนต์ที่เส้นอักษรอังกฤษยังไม่สม่ำเสมอ จึงต้องนั่งปรับเส้น glyph อังกฤษเสียก่อน ได้แก่ฟอนต์ Loma ซึ่งมีการหยิบยืมไปใช้ในฟอนต์ Umpush ด้วย การแก้ครั้งนี้จึงทำให้ฟอนต์ทั้งสองได้เส้นที่สม่ำเสมอยิ่งขึ้นด้วย
- ระหว่างทดสอบ พบบั๊กในฟอนต์ Loma และ Umpush เมื่อใช้กับเอกสาร LaTeX คือสระบนและวรรณยุกต์จะเยื้องกัน ทำให้คำว่า "ที่" จะวาดไม้เอกและสระอีไม่ตรงแนวกัน ก็แก้บั๊กนี้ในฟอนต์ทั้งสองด้วย
บั๊กตัวแรกที่พบจึงไม่ใช่แมลงธรรมดา แต่เป็นผีเสื้อกระพือปีกด้วยประการฉะนี้
ยังเหลือฟอนต์ชุด Arundina ต้องทำต่ออีกครับ แล้วค่อยออกทั้งชุดพร้อมกันทีเดียว
โดย noreply@blogger.com (Thep) ณ 3 กุมภาพันธ์ 2555 12:08 +0700
1 กุมภาพันธ์ 2555
For a few years that I have involved in Debian as a new maintainer. I have maintained some packages, "xiterm+thai", "flvmeta" and also the new ITP "ipset", which I have learned to package as well.
Many comments from several Debian Developers, especially Theppitak Karoonboonyanan and also Paul Wise, which I must say that both are the great teachers. They have pointed me to many good resouces for startup and also adviced me every mistakes I have made. They have shown that the "Debian Developers" is a kind of expertise and It's not easy if you do not try harder.
I know Theppitak as he is my idol and he who is the Debian guy that has introduced me to Debian as well. The first Debian distribution that I installed on the first my Debian computer (it's not my property, it's the company property that I worked with at that time) was "sid" aka. "unstable" and It's the main distribution that I always use for my main working laptop. IMHO, I never get back to any Linux distributions since I have found Debian.
I know Paul as he is a first Debian Developer I have met (at that time Theppitak was being in the NM process).
He is a cool guy. He also the first Debian Developer that signed my GPG key. He many times sponsored my packages and everytime for good practices.
However, the efforts you have get from the process are much more than you think as you could evaluate your self which you have more skills to handle with many problems than ever, you could package in the correct direction with a good quality. Obviously, you have learned to communicate with the communities which is the main reason that could bring you to be a good developer in the future.
Therefore, I have read the Debian Maintainer wiki page and applied the DM application (http://lists.debian.org/debian-newmaint/2012/01/msg00092.html) and thanks to both DDs that I mention above for their advocations.
Last, I have finished the last step 4 for account creation and my GPG key has been accepted to the active Debian Maintainer keyring (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657331).
Finally, I'm now a Debian Maintainer.
โดย neutron ณ 1 กุมภาพันธ์ 2555 14:51 +0700
โดยปกติแล้ว Web Server เครื่องๆ หนึ่งจะใช้สำหรับเว็บไซต์หลายเว็บ ซึ่งสามารถทำได้โดยการทำ Virtual Host โดยบน Apache สามารถทำได้ 2 แบบ คือ
1. IP Based Virtual Host คือการทำ Virtual Host โดยใช้ IP Address เป็นตัวแบ่ง ซึ่งวิธีนี้เราจะต้องมี IP สำหรับทุกๆ เว็บไซต์ที่จะทำ
2. Name Based Virtual Host วิธีนี้จะใช้ชื่อ domain name เป็นตัวแบ่ง โดยทุกๆ เว็บไซต์จะใช้ IP เดียวกันหมด ซึ่ง Hosting ส่วนใหญ่นิยมใช้แบบนี้ และวันนี้เราก็จะมาลองทำแบบนี้กัน ^^
ตัวอย่างที่เราจะทดสอบกันต่อไปนี้ Client เราจะใช้ Windows ส่วน Apache Web Server เราจะใช้ Linux CentOS ที่เราได้ทำการติดตั้งกันไปแล้วจากบทความก่อนๆ ส่วน DNS Server เราจะพูดถึงอีกทีในบทความต่อๆ ไป
เข้าเรื่องกันเลย อย่างแรกที่เราต้องทำก่อนก็คือกำหนดให้ domain name ของเรา point ไปยัง IP ของ Web Server ซึ่งในทีนี้ก็คือ 192.168.10.10 และเนื่องจากว่าเราเองยังไม่มี DNS Server ฉะนั้นในการทดสอบ ให้เราเข้าไปแก้ไข /etc/hosts ของเครื่องไคลเอนต์กันก่อน เพื่อกำหนดค่า ip ให้กับ domain แบบตรงๆ กันก่อน โดยถ้าใช้ windows ให้เข้าไปแก้ไขที่ไฟล์ c:\Windows\System32\drivers\etc\hosts และสำหรับ Linux ให้แก้ไขที่ไฟล์ /etc/hosts โดยให้เพิ่มบรรทัดต่อไปนี้
1
2
| 192.168.10.10 vhost1.unzeen.com
192.168.10.10 vhost2.unzeen.com |
เมื่อเพิ่มข้อมูลลงไปแล้ว ให้ทดสอบทำการ ping vhost1.unzeen.com ว่าได้ IP กลับมาถูกต้องหรือไม่ ถ้าได้แล้วก็ไปขั้นตอนถัดไปได้เลย

ขั้นตอนถัดไปให้เข้าไปที่ Linux Server และทำการสร้างโฟลเดอร์ /var/www/vhost1/ และ /var/www/vhost2/ เพื่อเอาไว้เก็บไฟล์ของเว็บไซต์
1
2
| # mkdir /var/www/vhost1/
# mkdir /var/www/vhost2/ |

จากนั้นทำการสร้างไฟล์ index.html ไว้ที่ /var/www/vhost1/ และ /var/www/vhost2/
# index.html ใน vhost1
1
2
3
4
5
6
7
8
| <HTML>
<HEAD>
<TITLE>VHOST1</TITLE>
</HEAD>
<BODY>
VHOST1
</BODY>
</HTML> |
# index.html ใน vhost2
1
2
3
4
5
6
7
8
| <HTML>
<HEAD>
<TITLE>VHOST2</TITLE>
</HEAD>
<BODY>
VHOST2
</BODY>
</HTML> |
เนื่องจากเราทำการล๊อกอินเข้าระบบด้วย root ฉะนั้นเพื่อความแน่ใจทำการเปลียน Permission ของ vhost1 และ vhost2 เล็กน้อย
1
2
| # chmod -R 755 /var/www/vhost1/
# chmod -R 755 /var/www/vhost2/ |

ต่อไปทำการแก้ไขไฟล์ /etc/httpd/conf/httpd.conf โดยให้เอา # หน้า NameVirtualHost ออก และเพิ่มบรรทัดในส่วนของ VirtualHost ลงไปตามตัวอย่าง
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@unzeen.com
DocumentRoot /var/www/vhost1
ServerName vhost1.unzeen.com
ErrorLog logs/vhost1.unzeen.com-error_log
CustomLog logs/vhost1.unzeen.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@unzeen.com
DocumentRoot /var/www/vhost2
ServerName vhost2.unzeen.com
ErrorLog logs/vhost2.unzeen.com-error_log
CustomLog logs/vhost2.unzeen.com-access_log common
</VirtualHost> |

จากนั้นสั่ง restart service ของ apache ด้วยคำสั่ง
1
| # service httpd restart |

เท่านี้ก็เป็นอันว่าเราทำการสร้าง VirtualHost เป็นที่เรียบร้อย ทดสอบเปิดจาก Web Browser ดูได้

วันนี้เท่านี้ก่อน รอบหน้าเราจะมาต่อกันที่เรื่อง SSL กันจริงๆ หละ
โดย LookHin ณ 1 กุมภาพันธ์ 2555 01:48 +0700
22 มกราคม 2555
หลังจากได้เรียนรู้วิธีการติดตั้งโปรแกรมในแบบต่างๆ ไปแล้ว วันนี้เรามาต่อกันที่การติดตั้ง Web Server โดยเราจะทำการติดตั้ง apache ให้ทำหน้าที่เป็น Web Server (http) และติดตั้ง mod_ssl เพื่อเอาไว้ใช้ทำ Secure Web Server (https) จากนั้นจะทำการติดตั้ง php และ php extension ต่างๆ เพื่อเอาไว้ใช้กับโปรแกรมที่เขียนด้วย php ซึ่งในบทความนี้ จะไม่ได้พูดถึงการใช้งานภาษา Perl, Python หรือโปรแกรมภาษาอื่นๆ หากผู้อ่านสนใจ ก็ตามไปศึกษาจากแหล่งข้อมูลอื่นๆ กันตามสะดวก และถ้าหากมีโอกาสในคราวหน้าก็อยากจะลองใช้ nginx ซึ่งเป็น Web Server ที่กำลังมาแรงตัวหนึ่งเหมือนกัน ^^
เริ่มจากติดตั้ง httpd และ mod_ssl โดยใช้คำสั่ง
1
| # yum install httpd mod_ssl |

ระบบจะแสดงข้อมูลและแพกเก็จต่างๆที่ต้องติดตั้ง ให้กด y เพื่อทำการติดตั้งต่อไป

เปิดไฟล์ /etc/httpd/conf/httpd.conf และเพิ่มหรือแก้ไขบรรทัด ServerName ลงไป โดยให้ใส่เป็นชื่อของเซอเวอร์ของเราลงไป
1
| # nano /etc/httpd/conf/httpd.conf |

จากนั้นทำการ start service httpd ด้วยคำสั่ง

ทดสอบเปิดเว็บไซต์ดูได้เลย

เมื่อติดตั้ง apache เรียบร้อยแล้วเราก็มาติดตั้ง php และ php extension ต่างๆกันต่อ อย่างแรกใช้คำสั่ง yum list php* เพื่อดูว่ามี php extension อะไรบ้างที่น่าสนใจ ให้จดหรือจำชื่อของ extension ต่างๆที่ต้องการเอาไว้

ทำการติดตั้ง php และ php extension ต่างๆ ที่ต้องการ
1
| # yum install php-common php-cli php-devel php-mysql php-gd php-imap php-mbstring php-mhash php-pear php-xml php-xmlrpc |

ต่อไปทำการสร้างไฟล์ info.php ในโพลเดอร์ /var/www/html/ ด้วยคำสั่ง
1
| # nano /var/www/html/info.php |
และพิมพ์ Source Code ของ PHP ลงไปดังนี้
1
2
3
4
5
| <?php
phpinfo();
?> |

สั่ง restart service httpd สักหนึ่งรอบ ด้วยคำสั่ง
1
| # service httpd restart |

เมื่อทุกอย่างเรียบร้อย ให้ทดสอบเปิด info.php ผ่าน web browser ดูนะครับ ^^
1
| http://192.168.10.10/info.php |

ก่อนจบเราต้องเพิ่มให้ service httpd ทำงานทุกครั้งที่เปิดเครื่องด้วยคำสั่ง

รอบหน้าเราจะต่อกันด้วยการทำ https ให้กับ web server ของเรากันต่อ
โดย LookHin ณ 22 มกราคม 2555 17:58 +0700
วันนี้ไปถึง BITEC บางนา แบบไม่ต้องพึ่งแท็กซี่ที่สถานนี้ออนนุชอีกแล้ว เพราะไปถึงสถานีบางนาแล้วเดินลงมาก็แทบเจอเลย. แว๊บแรกผ่าน อ่านเป็น "Del.icio.us" ทีไหนได้กลับมาดูในกล้องตัวเองมันเขียนเป็น "Deli.cio.us".

โดย chatsiri ณ 22 มกราคม 2555 01:17 +0700
20 มกราคม 2555
ได้ข่าวว่ามีอะไรใหม่ ใน Exteen.com อะไรก็ไม่รู้ ก็เลยมาลองโพสสักหน่อย อิๆ
20 มกราคม 2555 11:21 +0700
19 มกราคม 2555
Twitter-bootstrap helper tool release By Twitter designed useful when you want to developer twitter web application you can fork from github ( https://github.com/twitter/bootstrap )
โดย udomsakc (noreply@blogger.com) ณ 19 มกราคม 2555 20:07 +0700
15 มกราคม 2555
I have setup some Squid 3.2 proxy servers which deployed in the TPROXY (fully transparent proxy, aka IP spoofing) mode. For the normal deployment could be found here (http://www.balabit.com/downloads/files/tproxy/README.txt).
But I have some special services running inside the box whose intercepting some of clients connections from Squid (via ICAP) and done the request modification before sending it to the origin server and acts as a man-in-the-middle. In this case, my requirement is to also spoofing the outgoing source address of my special services connections. Thus, I have decided to send the requests back to Squid to done the spoofing as well.
I was searching the Internet for the solution. In the first place, I tried to setup the TPROXY destination in the "PREROUTING" chain of "mangle" table but not success as the local generated packets didn't pass this chain.
I found this page (http://www.squid-cache.org/Doc/config/tproxy_uses_indirect_client) and it's lucky that this configuration directive only available in Squid 3.2+.
Therefore, I just setup my special services to make the outgoing connections with "X-Forwarded-For" http header included through the Squid that acts as a proxy on another port, eg. 3129.
For the Squid configuration, I just add
...
http_port 3129 tproxy
...
...
follow_x_forwarded_for allow localhost
...
tproxy_uses_indirect_client on
...
...
Finally, I could done the setup for IP spoofing for all of the connections and the boxes are now truely transparent as it should be.
Note: As the "3129" listening port should not be exposed to the outside of the box, therefore, it should not be allowed to accept the connections from outside. A simple iptables rules is
# iptables -A INPUT -p tcp --dport 3129 ! -s 127.0.0.1 -j DROP
โดย neutron ณ 15 มกราคม 2555 23:59 +0700
13 มกราคม 2555
6 มกราคม 2555

ธนบัตร 5 ปอนด์สเตอร์ลิง ออกโดย Clydesdale Bank ในสกอตแลนด์ ด้านหน้าเป็นรูป อเล็กซานเดอร์ เฟลมมิง ผู้ค้นพบยาปฏิชีวนะ "เพนิซิลลิน"
การจะเลือกบุคคลสักคนหรือสักกลุ่มหนึ่งไปอยู่ในธนบัตร เราคงเดากันได้ไม่ยากว่า คนเหล่านั้นจะต้องมีความสำคัญกับประเทศหรือดินแดนนั้นมากแน่ จึงได้รับเลือกไปอยู่ในสิ่งของที่คนเกือบทุกคนใช้กันอยู่เกือบทุกวัน
สำหรับประเทศที่เคยผ่านการต่อสู้เพื่อให้ได้เอกราชหรือปลดแอกจากระบอบเผด็จการ กลุ่มผู้นำการปฏิวัติก็มักจะถูกเลือกมาอยู่บนธนบัตร ในประเทศที่มีกษัตริย์ รูปกษัตริย์ทั้งในอดีตและปัจจุบันมักจะถูกนำมาใช้ อย่างไรก็ตาม ก็ยังมีหลายประเทศหลายดินแดนที่ไม่ได้เป็นอย่างนั้น เช่น ญี่ปุ่น สเปน (ก่อนจะใช้เงินยูโร) อังกฤษและเวลส์ ไอร์แลนด์เหนือ และสกอตแลนด์ (สองอันหลังนี้ ใช้สกุลปอนด์สเตอร์ลิงทั้งคู่ แต่พิมพ์ธนบัตรเอง แยกต่างหากจาก Bank of England) ที่บุคคลบนธนบัตรเป็นบุคคลอื่น ๆ ด้วย โดยเป็นบุคคลที่เคยทำคุณงามความดีให้กับประเทศหรือเป็นบุคคลที่มีชื่อเสียง เช่น นักปรัชญา กวี นักวิทยาศาสตร์ นักประดิษฐ์
สกุลเงินยูโรน่าจะเป็นสกุลเงินเดียวที่ธนบัตรและเหรียญไม่มีรูปบุคคลเลย ทั้งนี้เป็นความตั้งใจในการออกแบบ ที่จะเลือกสิ่งที่ทุกประเทศในยูโรโซนสามารถเชื่อมโยงตัวเองเข้าไปได้ จึงไปใช้รูปสถาปัตยกรรมแทน โดยสถาปัตยกรรมเหล่านั้นก็ไม่ได้เป็นสิ่งปลูกสร้างที่มีอยู่จริง เพียงแต่วาดขึ้นมาให้มีรูปแบบที่พอจะทำให้นึกถึงสิ่งปลูกสร้างคล้าย ๆ กันในท้องที่ต่าง ๆ ของยุโรป
เมื่อวันสองวันก่อน เพื่อนในเฟซบุ๊กคนหนึ่งลองคิดเล่น ๆ ว่าถ้าเมืองไทยจะลองออกธนบัตร อาจจะเป็นธนบัตรที่ระลึกเนื่องในโอกาสพิเศษ เราจะลองเลือกใครมาอยู่ในธนบัตรได้บ้าง ขอเอามาแปะต่อ :
ชุด “ชาวต่างชาติที่มาร่วมพัฒนาประเทศสยาม” — ชุดนี้อาจจะออกเป็นที่ระลึกในวาระฉลองความสัมพันธ์ของไทยกับประเทศต่าง ๆ
ชุด “หลัก 6 ประการของคณะราษฎร” — ชุดนี้อาจจะออกเป็นที่ระลึกในวาระฉลองรัฐธรรมนูญหรือวันชาติ 24 มิถุนายน หรืออาจจะเป็นในวาระวันเกิดของแต่ละคนก็ได้
ใครสนใจ ลองดูต่อได้ที่วิกิพีเดีย: รายชื่อบุคคลในธนบัตรของประเทศต่าง ๆ
(โพสต์ไปไม่ทันไร มีคนบอกว่า จะเอา “หลินปิง”!!!)


โดย bact ณ 6 มกราคม 2555 13:26 +0700
Setup PHP ( 5.3.8 ) + lighttpd on Fedora core 15 with quick and dirty Jobs with user home dir homepage ( mod_userdir )
หลังจากเช้้านี้ มีความจำเป็นต้องทำ report ส่ง แต่ติดปัญหา เนื่องจาก notebook ไม่เร็วพอ และ ขณะเดียวกันก็ติดปัญหา ต้องรัน script PHP เลยต้องย้ายมาเครื่อง desktop ของที่ทำงานแทน ต้องมั่งนั่ง set อีก ครึ่งชั่วโมง
ปัญหาที่เจอก็คือ เรื่องการ run script PHP + lighttpd บน Fedora core 15 พบว่าบน Turorial ทั้งหลายแหล่ ใช้งานไม่ได้ มันก็จริงตามที่คนอื่นบอก Howto ทั้งหลายแหล่ + tutorial มักใช้งานไม่ได้จริง พักหลังๆ มาเจอกับตัว หลายเวบล่ะ ทำเองดีกว่า เข้าเรื่อง
Install basic php5 and lighttpd
Install php-fpm
- enabled lighttpd module
- restart service
- degug log if error
ตอนแรกจะ set เป็น CGI ง่ายๆ เอารัน PHP ก็พอ แต่ปรากฏว่า Fedora Core 15 ไม่มี package CGI มาให้ งานเข้าล่ะ เรื่องยาวแน่มีแต่ FastCGI เอาวะ Fast ก็ Fast
vim /etc/lighttpd/lighttpd.conf or replace with this configuration below var.log_root = "/var/log/lighttpd"
var.server_root = "/var/www"
var.state_dir = "/var/run"
var.home_dir = "/var/lib/lighttpd"
var.conf_dir = "/etc/lighttpd"
var.vhosts_dir = server_root + "/vhosts"
var.cache_dir = "/var/cache/lighttpd"
var.socket_dir = home_dir + "/sockets"
include "modules.conf"
server.port = 80
server.use-ipv6 = "enable"
server.username = "lighttpd"
server.groupname = "lighttpd"
server.document-root = server_root + "/lighttpd"
server.pid-file = state_dir + "/lighttpd.pid"
server.errorlog = log_root + "/error.log"
include "conf.d/access_log.conf"
include "conf.d/debug.conf"
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.stat-cache-engine = "simple"
server.max-connections = 1024
index-file.names += (
"index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
)
url.access-deny = ( "~", ".inc" )
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" , ".rb" , ".py" )
include "conf.d/mime.conf"
include "conf.d/dirlisting.conf"
server.follow-symlink = "enable"
server.upload-dirs = ( "/var/tmp" )
vim /etc/lighttpd/module.conf or replace with this configuration below # ** NOTE ** i'm enabled mod userdir
server.modules = (
"mod_access",
"mod_cgi",
"mod_alias",
"mod_auth",
"mod_evasive",
"mod_redirect",
"mod_rewrite",
"mod_setenv",
"mod_usertrack",
"mod_fastcgi",
)
include "conf.d/status.conf"
include "conf.d/userdir.conf"
include "conf.d/fastcgi.conf"
include "conf.d/cgi.conf"
include "conf.d/debug.conf"
vim /etc/lighttpd/conf.d/fastcgi.conf
server.modules += ( "mod_fastcgi" )
fastcgi.server = ( ".php" =>
( "php-tcp" =>
(
"host" => "127.0.0.1",
"port" => 9000,
"check-local" => "disable",
"broken-scriptfilename" => "enable",
)
)
)
**Option if you want to debug lighttpd set /etc/lighttpd/debug.conf
debug.log-request-handling = "enable"
debug.log-request-header = "enable"
debug.log-request-header-on-error = "enable"
debug.log-response-header = "enable"
debug.log-file-not-found = "enable"
debug.log-condition-handling = "enable"
**Option if you want to enable per user homepage set '/etc/lighttpd/conf.d/userdir.conf
server.modules += ( "mod_userdir" )
#userdir.path is your userdir homepage
userdir.path = "project"
- restart service
- **NOTE** for default Fedora if you not set rule for SELinux **disable it before otherwise you will got error and can't running '/etc/selinux/config'
- log file of lighttpd is '/var/log/lighttpd/* '
- log file of php-fpm is ' /var/log/php-fpm/*
- จบข่าว
โดย udomsakc (noreply@blogger.com) ณ 6 มกราคม 2555 12:01 +0700
Setup & Install puppet repository for puppetlab into Fedora Core 15 ( Quick and Dirty )
# yum install sudoadd Puppetlabs repository cat > /etc/yum.repos.d/puppetlabs.repo[Puppetlabs]
name=Puppetlabs
baseurl=http://yum.puppetlabs.com/fedora/f$releasever/products/$basearch/
failovermethod=priority
skip_if_unavailable=1
gpgkey=http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs
ggpkey=http://yum.puppetlabs.com/RPM-GPG-KEY-reductive
enabled=1
gpgcheck=1
[ press Ctrl-D ]
# yum update
Quick and Dirty install ** So this method not including with some dependencies
# yum -y install `yum search puppet | cut -f1 -d':'`
{ So enjoy with PuppetLabs ! :) }
Documentation
Git hub code repository for Puppet configuration management
โดย udomsakc (noreply@blogger.com) ณ 6 มกราคม 2555 12:00 +0700