Re: 請問一下apache的vhost
※ 引述《mikehu.bbs@bbs.tku.edu.tw (僑中丙子)》之銘言:
> 請問一下,Apache裡面設定Virhost之後,
> 可不可以限定某一個vHost的權限,例如
> 設定這一個vHost只有某些ip才能讀取,
<Directory /path/your_vhost_directory>
Order Allow,Deny
Allow from 192.168.1.0/24
</Directory>
> 或是想要讓必須輸入密碼才能瀏覽,
同上,在裡面放置 AuthType, AuthName,AuthUserFile 與 require 項目
提供驗證功能.
詳細部份請參閱 apache document。
http://httpd.apache.org/docs-2.0/howto/auth.html
> 或是...的其他功能,但不會影響其他vHost的設定!
若是認為寫在 apache 設定檔案不方便,您也許可以提供 .htaccess 檔案方式
來提供這樣設定,如此使用者也可以自己管理而不需要 apache 組態檔案修改
來達成需求.
詳細部份請參閱 apache document。
http://httpd.apache.org/docs-2.0/howto/htaccess.html
--
真誠最可貴 用心最踏實
--
※ Origin: SayYA 資訊站 <bbs.sayya.org>
◆ From: kendlee.sayya.org
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
FreeBSD 近期熱門文章
PTT數位生活區 即時熱門文章