apache的網頁帳密功能(mod_auth)搭配使用WindowsAD作認證
作者:cross 日期:2011-12-26 12:19
2。設定 apache ,vi /etc/httpd/conf.d/htaccess.confyum install mod_authz_ldap
3。重啟apache<Directory /var/www/html/test>
AuthzLDAPMethod ldap
AuthzLDAPAuthoritative on
AuthzLDAPServer 10.10.10.123:389 # AD 的IP
AuthzLDAPUserBase "DC=cross,DC=local" # AD的網域名稱,我的是 cross.local
AuthzLDAPUserKey sAMAccountName
AuthzLDAPUserScope subtree
AuthzLDAPBindDN "cross" # AD 管理者的帳號
AuthzLDAPBindPassword "crosspassword" # AD 管理者的密碼
AuthName "Need Password with using AD"
AuthType Basic
require valid-user
</Directory>
4。瀏覽 http://10.10.10.111/test ,測試登入帳密是否可以成功用AD的帳密登入
ref : http://www.extmail.org/forum/thread-12794-1-1.html
Apache Range Header DOS 攻擊讓主機資源輕易消秏待盡
作者:cross 日期:2011-09-15 21:01
這個攻擊是八月底的消息,它是一個apache的弱點,對 header 作攻擊,好像是它本就是一個正常的規則,
只是如果分好幾個片斷去 request 的話,就會讓apache 資源慢慢的被耗光,最後 crashed。
一般對 80 的請求為
telnet 10.10.10.135 80
GET / HTTP/1.1
Host: 10.10.10.135
<enter>
結果
HTTP/1.1 200 OK
Date: Thu, 15 Sep 2011 10:12:02 GMT
Server: Apache
apache強制某路徑使用https方式連線
作者:cross 日期:2011-06-26 16:31
比方說我的http://ssorc.tw/admin 後台,要登入帳密的地方我需要讓它使用SSL加密連線
就在httpd.conf 設定加入如下設定
<Directory /path/admin>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /path/admin
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https ://%{SERVER_NAME}/admin/$1 [L,R]
# https跟://之間我故意空白,因為會讓我文章無法存檔
</IfModule>
</Directory>
apahce module模組--mod_pagespeed -- Google出的,用來優化網頁
作者:cross 日期:2011-04-20 09:45
http://code.google.com/intl/zh-TW/speed/page-speed/docs/module.html
mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content with the Apache HTTP Server.
下載頁面 http://code.google.com/intl/zh-TW/speed/page-speed/download.html
我要用的是 : mod_pagespeed 32-bit .rpm (CentOS/Fedora)
安裝
rpm -ivh mod-pagespeed-beta_current_i386.rpm
套件內容
關閉apache與php版本顯示
作者:cross 日期:2011-02-08 12:19
目的:不想讓網頁頁面出現這樣子的錯誤訊息
Not Found
The requested URL /123 was not found on this server.
Apache/2.0.52 (CentOS) Server at 10.10.10.135 Port 80
關閉apache版本,vi /etc/httpd/conf/httpd.conf
ServerTokens OS # 找到這一行,將“OS”改為“Prod”
# 改為
ServerTokens Prod # 在出現錯誤頁的時候不顯示服務器操作繫統的名稱ServerSignature On # 找到這一行,將“On”改為“Off”
# 改為
ServerSignature Off # 在錯誤頁中不顯示Apache的版本
關閉php版本,vi /etc/php.ini
expose_php = On
# 改為
expose_php = Off
重啟apache
Apache + mod_security 網站應用程式防火牆阻擋攻擊(WAF)
作者:cross 日期:2010-11-30 16:59
quote: http://www.modsecurity.org/documentation/modsecurity-apache/2.5.12/html-multipage/introduction.html
ModSecurity is a web application firewall (WAF). With over 70% of attacks now carried out over the web application level, organisations need all the help they can get in making their systems secure. WAFs are deployed to establish an increased external security layer to detect and/or prevent attacks before they reach web applications. ModSecurity provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring and real-time analysis with little or no changes to existing infrastructure.
安裝--
下載套件: http://www.modsecurity.org/download/
編譯
apache 搭配 mod_write 來得知是不是透過手機來瀏覽網站的
作者:cross 日期:2010-10-29 15:44



