การดูสถานะการทำงานของ Apache Web Server
- เข้าไปแก้ไข file /etc/apache2/mods-enabled/status.conf
2. แก้ไขส่วนของ Location /server-status ดังนี้
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from <ip ของเครื่องที่อนุญาตให้ดู server status ได้>
</Location>
ตัวอย่างนี้เราจะเปิดให้ทุกเครื่องสามารถเข้ามาดูได้ (ไม่แนะนำ เพราะไม่ปลอดภัย) เราก็แก้ไขดังนี้
<Location /server-status>
SetHandler server-status
Order allow,deny
Allow from all
</Location>
3. ทำการตรวจสอบความถูกต้องของ config file ทั้งหมดอีกครั้งก่อนทำการ restart apache
sudo apachectl configtest
4. ทำการ restart service ของ apache
sudo systemctl restart apache2
5. เปิด browser เข้าไปที่หน้า web server ของเราแล้วตามด้วย “/server-status”
*** notes ***
คำสั่งสำหรับ enable mod : a2enmod
คำสั่งสำหรับ disable mod : a2dismod