Aug 05
จดไว้กันลืม จะใช้จะได้ไม่ต้องหาอีก ช่วงนี้ยิ่งมีอะไรต่อมิอะไรเยอะแยะไปหมด
สำหรับคนที่ต้องการใช้ PHP4 บน Ubuntu 8.04 นะครับ Download source มาเลยครับ ไม่ต้องคิดมาก ต้อง compile แน่นอน
ขั้นแรกติดตั้งสิ่งที่ต้องการก่อน ทางที่ดีก็เอา PHP5 ลงไปด้วย เผื่อใช้ ครับ แต่ปิดที่ apache ละกันครับ
apt-get install build-essential flex bison
apt-get install libmysqlclient15-dev libbz2-dev libjpeg62-dev libpng-dev libtiff-dev libfreetype6-dev libmcrypt-dev librecode-dev
apt-get install apache2 apache2-threaded-dev php5 php5-cli php5-dev php5-gd php5-mcrypt php5-mysql php5-recode php5-curl php-pear php-db
ถัดไปเริ่มทำการ configure ก็เก็บเอาจาก config.nice มาให้ใช้เลยครับ จะได้ง่ายๆ
#! /bin/sh
#
# Created by configure
‘./configure’ \
‘–with-mysql’ \
‘–with-zlib’ \
‘–with-bz2′ \
‘–with-gd’ \
‘–enable-gd’ \
‘–enable-gd-native-ttf’ \
‘–with-jpeg-dir’ \
‘–with-png-dir’ \
‘–with-ttf’ \
‘–with-freetype-dir’ \
‘–with-iconv’ \
‘–enable-track-vars’ \
‘–with-gettext’ \
‘–enable-trans-id’ \
‘–enable-mbstring’ \
‘–with-openssl’ \
‘–disable-cli’ \
‘–with-mcrypt’ \
‘–with-pear’ \
‘–with-recode’ \
‘–with-zlib’ \
‘–with-apxs2=/usr/bin/apxs2′ \
‘–with-config-file-path=/etc/php4′ \
‘–prefix=/usr/local/php4′ \
"$@"
เสร็จสิ้นกระบวนการรบ จะเอาไปทำอะไรต่อก็แล้วแต่ละกันครับ
Tagged with: apache • php4 • ubuntu
Jan 23
ช่วงนี้เจอ spammer พยายามส่งเมล์ผ่าน POST ของระบบบ่อยมาก จำเป็นต้องหาวิธีแก้ด่วย ซึ่งแรกๆ ก็ block ด้วย class ของ IP เช่น
deny from xx.0.0.0/8
deny from xx.xx.0.0/16
แต่ก็ยังไม่พอ พบว่าก็ยังมีเข้ามาได้อีก
ก็เลยใช้วิธีที่ block การใช้งาน เฉพาะ User-Agent นั้นๆ โดยเฉพาะ เพราะส่วนใหญ่จะมาคล้ายๆ กัน
SetEnvIfNoCase User-Agent "^xxxxxxxxx" banned
SetEnvIfNoCase User-Agent "xxxxxxxxx" banned
deny from env=banned
แต่ก่อนที่จะใช้ ข้างต้น ต้องสามารถใช้งาน setenvif ก่อนด้วยนะครับ
อ้างถึง
- http://www.askapache.com/htaccess/fight-blog-spam-with-apache.html
- http://www.webmasterworld.com/apache/3234357.htm
- http://www.joomla-downloads.de/forum/profile/showposts/jackdaniels-1514/
Tagged with: apache • block • denied • spam • spammer
Nov 25
In some cases, your web server have attacked by someone how to resolve this problem?
Use mod_evasive to resolve this problem
When mod_evasive detects attack, it will create hash table and deny that ip following :
- Requesting the same page more than a few times per second
- Making more than 50 concurrent requests on the same child per second
- Making any requests while temporarily blacklisted (on a blocking list)
You can get this module via : http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
Continue reading »
Tagged with: apache • dos-attack • mod-evasive
Aug 31
อบรม LPIC 1 – Day 4
มี reverse-proxy and loadbalance มาแนะนำ
http://www.apsis.ch/pound
ส่วนอีกตัวนึงก็เป็น webserver ตัวเล็ก
http://www.0×50.org
คงต้องไปลองเล่นก่อนแล้วค่อยมาแจ้งอีกทีงับ
อ้อลืมไปมีอีกตัวที่ ok เหมือนกัน เคยเล่นแล้วเจ๋งดี
Balance อันนี้รันเป็น command แล้ว forward port ที่เข้ามาได้เลย
http://www.inlab.de/home.html
Tagged with: apache • webserver
Jul 31
วิธีการแก้ไขง่ายๆ สำหรับ Cross-site tracing attack via HTTP TRACK / TRACE method
สำหรับ Apache ตั้งแต่ version 1.3.34 และ 2.0.55 ขึ้นไปนะครับ ทำได้โดยเพิ่ม
TraceEnable Off
ใน config ของ apache ซึ่งจะทำให้ปิดการใช้งาน Trace ได้
Continue reading »
Tagged with: apache