How to check that the Apache compression (gzip, deflate) is working?

Posted In Web Server - By Tum. On Friday, May 24th, 2013 With 0 Comments

apache web serverการตรวจสอบว่า apache ที่ได้ config ไปนั้นได้ทำการ compress data ก่อนส่งไปยัง client หรือไม่ ผ่านทาง command line ของระบบ สามารถทำได้โดยใช้คำสั่ง curl ในการตรวจสอบ

วิธีการตรวจสอบ จะใช้วิธีการส่ง request ไปยัง apache ว่าบอกว่าให้สามารถส่งข้อมูลมาด้วยวิธีการ compression มาได้ และหลังจากนั้นให้เราตรวจสอบจาก header ที่ apache ได้ตอบกลับมา ว่ามีเป็นการส่งข้อมูลมาแบบไหน

ตัวอย่างคำสั่งในการตรวจสอบว่า apache รองรับการทำงานแบบบีบอัดข้อมูลหรือไม่

โดยแทน http://www.ezylinux.com เป็น URL ที่ต้องการตรวจสอบ

ถ้าหากรองรับการทำงานแบบบีบอักข้อมูลจะตอบกลับมาดังนี้

หรือ

ตัวอย่างการรันคำสั่ง และ ผลลัพธ์

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*