星期一, 八月 15, 2005

Apache 1.x版 部份參數說明(I)

很棒的一份 Apache 參數說明, 應該說是 httpd.conf 說明.

分三部份. 主要由 apache 部份參數說明 轉載.

以下轉載自: apache 部份參數說明

AllowOverride 的屬性功能

AllowOverride Limit 允許蓋掉原聯結屬性得範圍
AllowOverride Authconfig 可做密碼設定:如:藏密
AllowOverride Options 可將該目錄之Options 功能覆蓋
AllowOverride FileInfo 可將該目錄之任何文件型態覆蓋,如:DefaultType,ErrorType
AllowOverride Indexs 可將該目錄之顯式列印功能覆蓋,如:AddIcon,HeaderName.ReadName

Options的屬性功能

Indexs 當無index.html可用列印目錄方式顯式,如:center3 homepage 若用 -Indexs 則看不見 listing
FollowSymLinks 加一屬性如+FollowSymLinks可允許使用symbol link 時,依舊可瀏覽
ExecCGI 當為 +ExecCGI可執行 CGI SCRIPT
Includes 可執行Server site include,若為 +Includes
IncludesNOEXEC 可執行Server site include,若為 +Includes,但不可執行CGI
None 沒有任何功能可用
All 均可
總之,以 +, - 符號可加或刪減其功能,若未給符號,則只有初步功能

Limit的屬性功能

GET 限定取得文件法,如:
POST 限定cgi post方法,如:
order 限定拒絕或允許的次序
deny 限定拒絕範圍,如:deny from all 或 deny from .mycompany.com
allow 限定允許範圍,如:allow from all 或 allow from 192.153.22

AuthConfig 之方法 & .htaccess 範例


#與Directory同,但在 .htaccess 只能用他 AuthName Members-only 設定僅 Member 才可入,僅為名稱 AuthType Basic 解碼方法 AuthUserFile /home1/users/center/center21/public_html/wwwclass/bau
#密碼表位置(絕對位置) AuthGroupFile /home1/users/center/center21/public_html/wwwclass/group
#同群表位置

#限制取件
require user center21
#bau的密碼表有很多user,但....
order allow,deny
#先允許在拒絕
allow from all
#允許全部

密碼表之產生方法

找到及取得htpasswd程式
執行htpasswd -c filename username (第一次,以後僅htpasswd filename username)
修改需要的 user (在 require 後)

require用法

require user center21 center3
require group cc cv ee

相關標籤
Add this page to del.icio.us Add this page to Yahoo Taiwan's bookmark Add this page to MyShare

發表迴響

標題

內容 (限制 1000 字)

暱稱

電子郵件

個人網頁


 authimage


PS: 若無法留言, 請先確認是否有打開 JavaScript, 造成您的困擾, 實在萬分對不起 Orz...(如果無法留言, 勞煩可以發信給我好嗎? 謝謝.)
PS2: 若您的留言被誤判, 我都會再自行看過, 不需要一直重覆張貼~