รถเช่า ประเภทต่างๆ
รถเช่า จังหวัด
การปรับค่า page speed Leverage browser caching
วันที่: 14/09/2013
เวลา: 19:16:23
<IfModule mod_expires.c>
<FilesMatch "\.(jpg|jpeg|gif|png|html|htm|swf|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</FilesMatch>
</IfModule>
<FilesMatch "\.(jpg|jpeg|gif|png|swf|xml|css|js)$">
Header set Cache-Control "max-age=2419200, public"
</FilesMatch>
โดยสามารถตั้งค่าและกำหนดระยะเวลา ได้
(ปัจจุบัน Directadmin จะทำการ enable เป็น default มาอยู่แล้ว)
วิธีการติดตั้ง
http://help.directadmin.com/item.php?id=50
http://www.ireallyhost.com/kb/server/131
<FilesMatch "\.(jpg|jpeg|gif|png|html|htm|swf|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</FilesMatch>
</IfModule>
<FilesMatch "\.(jpg|jpeg|gif|png|swf|xml|css|js)$">
Header set Cache-Control "max-age=2419200, public"
</FilesMatch>
วิธีติดตั้ง mod_expires เป็น โมดูลเสริมให้กับ Apache
เพื่อเพิ่มประสิทธิภาพ การ Cache Header โดยเฉพาะ Static File เช่น ไฟล์ภาพ, Flash fileโดยสามารถตั้งค่าและกำหนดระยะเวลา ได้
(ปัจจุบัน Directadmin จะทำการ enable เป็น default มาอยู่แล้ว)
วิธีการติดตั้ง
- vi /usr/local/directadmin/custombuild/configure/ap2/configure.apache
- เพิ่ม
"--enable-expires" \
ข้อระมัดระวัง
- โปรดสังเกตุ เครื่องหมายปิดท้าย [ \ ]
- ตรวจทานดูให้แน่ใจว่า ยังไม่มีคำสั่งดังกล่าว
ข้อระมัดระวัง
- โปรดสังเกตุ เครื่องหมายปิดท้าย [ \ ]
- ตรวจทานดูให้แน่ใจว่า ยังไม่มีคำสั่งดังกล่าว
- cd /usr/local/directadmin/custombuild/
- ./build apache
- ./build php n
- service httpd reload
http://help.directadmin.com/item.php?id=50
http://www.ireallyhost.com/kb/server/131
รูปแบบการใช้งาน
เพิ่มข้อมูลด้านล่างนี้ ในไฟล์ .htaccess
หากไม่มีให้สร้างไฟล์ และอัพโหลดไว้ที่ /public_html/
และปรับระยะเวลา cache ตามต้องการ
ไฟล์ ( /public_html/.htaccess )
ความคิดเห็นทั้งหมด
ยังไม่มีความคิดเห็น มาร่วมแสดงความคิดเห็นเป็นคนแรกสิ!