Oct 09

#DocumentRoot “C:/Program Files/Apache Group/Apache2/htdocs”
DocumentRoot “D:/vss” #修改root文件夾
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the “default” to be a very restrictive set of
# features.
#

閱讀這篇文章的其餘部分 »


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書




Oct 09

Apache 限制IP訪問

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

<Directory "/vhost dir/">
Options Indexes FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
Allow from 172.16.0.0/255.255.0.0

</Directory>


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書




Oct 09

apche 防止圖片盜鏈

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

######## Preventing Image ‘Theft’ ########

SetEnvIfNoCase Referer “^http://(.)+\.vincent\.idv\.hk/” local_ref=1
SetEnvIfNoCase Referer “-” local_ref=1
######## Allow the LOGO image Theft ##########
SetEnvIf Request_URI “/images/logo(.)+” local_ref=0

<FilesMatch “\.(png|gif|jpg)”>
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>

參考文檔:

Preventing Image ‘Theft’ By: Ken Coar
Preventing hot linking of images by JavaScript Kit
SetEnvIfNoCase 和 SetEnvIf 的說明文檔
http://httpd.apache.org/docs-2.0/mod/mod_setenvif.html#setenvif


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書




Oct 09

限制並發數
下載模塊:

到官方網址: http://www.nowhere-land.org/programs/mod_vhost_limit/下載模塊

http://www.nowhere-land.org/programs/mod_vhost_limit/mod_vhost_limit-0.4.tar.gz

閱讀這篇文章的其餘部分 »


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書




Oct 09

Apache 限制IP連接數

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

限制IP連接數

到這裡下載模塊 http://dominia.org/djao/limit/mod_limitipconn-0.04.tar.gz

安裝:
tar zxvf mod_limitipconn-0.04.tar.gz
cd mod_limitipconn-0.04
make APXS=/usr/local/apache/bin/apxs s—–這裡要按你自己的路徑設置
make install APXS=/usr/local/apache/bin/apxs s—–這裡要按你自己的路徑設置

編輯httpd.conf
添加
全局變量:
< IfModule mod_limitipconn.c >
< Location / > # 所有虛擬主機的/目錄
MaxConnPerIP 3 # 每IP只允許3個並發連接
NoIPLimit image/* # 對圖片不做IP限制
< /Location >

< Location /mp3 > # 所有主機的/mp3目錄
MaxConnPerIP 1 # 每IP只允許一個連接請求
OnlyIPLimit audio/mpeg video # 該限制只對視頻和音頻格式的文件
< /Location >
< /IfModule >

或者虛擬主機的:
< VirtualHost xx.xxx.xx.xx > ##ip 地址
ServerAdmin easy@phpv.net
DocumentRoot /home/easy
ServerName www.phpv.net
< IfModule mod_limitipconn.c >
< Location / >
MaxConnPerIP 5
NoIPLimit image/*
< /Location >
< Location /mp3 > # 所有主機的/mp3目錄
MaxConnPerIP 2 # 每IP只允許一個連接請求
OnlyIPLimit audio/mpeg video # 該限制只對視頻和音頻格式的文件
< /Location >
< /IfModule >
< /VirtualHost >


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書




Oct 09

Apache 限制頻寬

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

1、APACI 安裝
cp mod_bandwidth.c /path/to/apache/source./configure –add-module=mod_bandwidth.c –permute-module=BEGIN:bandwidth
2、DSO方式安裝
apxs -c /mod_bandwidth.c -o /path/to/apache/libexec/mod_bandwidth.so

閱讀這篇文章的其餘部分 »


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書




Oct 09

APACHE防止ddos 攻擊

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

mod_dosevasive 的使用方法:

首次下載 mod_dosevasive 1.1 版本。
然後解壓 mod_dosevasive_1.10.tar.gz

tar zxvf mod_dosevasive_1.10.tar.gz

閱讀這篇文章的其餘部分 »


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書