1.修改D:\PHPnow-1.5.6\Apache-22\conf\extra\httpd-vhosts.conf
<Directory "../vhosts/alantop.5166.info">
Options -Indexes FollowSymLinks
</Directory>
<Directory "../vhosts/alantop.5166.info/m">
Options -Indexes FollowSymLinks
Allowoverride authconfig
order allow,deny
allow from all
</Directory>
2. 在m目錄下建立 .htaccess 在windows系統下,先建立一個文件名,然后改名的方式創建文件。
文件內容如下:
AuthName "Login"
AuthType basic
AuthUserFile "D:\PHPnow-1.5.6\user.txt"
require valid-user
3. Apache2\bin>htpasswd -cmdps D:\PHPnow-1.5.6\user.txt alantop