Monday, February 12, 2007

setup web server ด้วยโปรแกรม httpd (apache 2.0)

ขั้นตอนการติดตั้ง www server ด้วยโปรแกรม httpd (apache 2.0)


(1) ใช้คำสั่ง
apt-get install httpd
apt-get install httpd-manual

(2) ติดตั้ง mod_ssl เพิ่มเติมด้วยคำสั่ง
apt-get install mod_ssl

(3) สั่งให้ทำงานทุกครั้งที่บูทเครื่อง
chkconfig httpd on

(4) สั่งให้ทำงานด้วยคำสั่งว่า
/etc/init.d/httpd start
Starting httpd: [ OK ]

(5) แก้ไขแฟ้ม
/etc/httpd/conf/httpd.conf ให้มีบรรทัดข้อความดังนี้

(6) เอา Comment หน้าคำว่า
DefaultLanguage nl ออก

(7) ให้เพิ่มบรรทัดใหม่ข้อความว่า
DefaultLanguage th

(8) ให้เพิ่มบรรทัดใหม่ข้อความว่า
AddLanguage th .th

(9) ให้เพิ่มข้อความอักษร th แทรกเข้าไป กลายเป็น
LanguagePriority th en ca ca da de .

(10) เดิมมีบรรทัดว่า AddDefaultCharset UTF-8ให้แก้ไขข้อความอักษรจาก
UTF- 8เป็นTIS-620

(11) ให้เพิ่มบรรทัดใหม่ข้อความว่า
AddCharset TIS-620 .tis- 620 .th

(12) แก้ไขให้เป็น ดังนี้
Options FollowSymLinks

(13) เอา Comment หน้าคำว่าแล้วเปิด Function ที่ครอบข้อมูลนี้ออกเพื่อใช้งาน


# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html
ServerName www.radiusmsu.org
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common


(14) เอา Comment หน้าคำว่า


AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

Order allow,deny
Allow from all


Order deny,allow
Deny from all





***************** THE END *********************

No comments: