2007年1月8日 星期一

Apache 2的目錄保護

.htaccess
-----------------
AuthType Basic
AuthName "Password Required"
# (Following line optional)
AuthUserFile /*************
Require valid-user

default-server.conf
-------------------------------
Include /etc/apache2/conf.d/*.conf [After Add]
Include /etc/apache2/tingadd/*.conf

in "tingadd" Directory
dir.conf
------------------------------------

Options None
AllowOverride AuthConfig
Order deny,allow
Deny from all
Allow from 192.168.0.0/255.255.255.0


=======================================================OK!

沒有留言: