Apache 模組 mod_access 限制管理存取連線
作者:cross 日期:2008-03-18 20:12
只設定 Order Allow, Deny 即拒絕全部,如有其它規則 Allow from all、Deny from all 等,會以 Allow 優先處理
而只設定 Order Deny, Allow 就相反過來,允許全部,如有其它規則 Allow from all、Deny from all 等,會以 Deny 優先處理
只允許 10.1.1.1 連線可設定為
- Order Allow,Deny
- Allow from 10.1.1.1
不可以這樣設,這樣就全部允許了
- Order Deny,Allow
- Allow from 10.1.1.1
不過加一條 Deny 上去即可,它會先讀 Deny 再讀 Allow
- Order Deny,Allow
- Allow from 10.1.1.1
- Deny from all
比較四種情況
Apache 模組: 頻寬限制 mod_cband
作者:cross 日期:2008-02-05 14:23
mod_cband 可以達到對 virtualhost 作頻寬、連線數限制,且總流量到了某階段可以重導至某個頁面作提示或者直接對速度作設限
1.) yum 安裝 mod_cband
2.) 設定狀態瀏覽,vi /etc/httpd/conf.d/mod_cband.conf
LoadModule cband_module modules/mod_cband.so
<Location /cband-status>
SetHandler cband-status
Order allow,deny
Allow from 127.0.0.1/32 10.1.1.0/24
</Location>
<Location /cband-status-me>
SetHandler cband-status-me
Order allow,deny
Apache 模組 mod_watch - 畫每個網站的 mrtg 圖
作者:cross 日期:2008-02-03 13:12
環境
cross.tw 192.168.1.93
cross2.tw 192.168.1.93
1.) 下載 http://updates.interworx.info/iworx/legacy/sources/
2.) 安裝 mod_watch 給 Apache
a.) 在編譯時讓程式知道 apxs 在那裡
vi Makefile.dso
#
# The location of apxs utility.
#
APXS=/usr/sbin/apxs
b.) 開始編譯
make -f Makefile.dso install
apache 模組 mod_log 記錄訊息
作者:cross 日期:2007-11-08 16:26
error_log記錄檔
-記錄錯誤訊息
-等級分[debug/info/notice/warm/error/crit/alert/emerg],,往右越簡單
-由LogLevel參數來定義記錄等級,預設為warm
access_log記錄檔
-記錄存取訊息
-等級分[combined/common/referer/agent],往右越簡單,(看LogFormat 就可知)
-由LogFormat來定義名稱及它的格式為何
# 名稱 combined 它的格式為 "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i""
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
變數解譯
Web Server有那幾種
作者:cross 日期:2007-08-12 11:53
- Apache
What IS the Apache HTTP Server Project?
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.
- cherokee http://www.cherokee-project.com/
Flexible and Fast Web server
IIS lighttpd nginx
得知apache的process是在run那個網頁VirtualHost的模組mod_status
作者:cross 日期:2007-06-27 18:22
apache+mod_ssl+openssl+php+mm+mysql重新編譯
作者:cross 日期:2007-05-04 13:52
Tarball Compiling
openssl-0.9.8e
sh config no-idea no-threads -fPIC && make && make test
mm-1.4.2
./configure --disable-shared && make
mod_ssl-2.8.28-1.3.37
./configure --with-apache=../apache_1.3.37 --with-ssl=../openssl-0.9.8e --with-mm=../mm-1.4.2 --prefix=/usr/local/apache/ && cd ../apache_1.3.37
apache_1.3.37
[1.] ./configure --prefix=/usr/local/apache --enable-module=most --enable-shared=max && make
[Q1:] apache_1.3.37]# make
gcc -c -I../../os/unix -I../../include -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite `../../apaci` -fpic -DSHARED_MODULE mod_auth_dbm.c && mv mod_auth_dbm.o mod_auth_dbm.lo




