Wednesday, October 16, 2013, 08:15 - Blog網誌
Apache htaccess網頁認證設定 - Linux Server網頁目錄下編輯檔案 .htaccess
AuthType Basic
AuthName "mirror tw have to authenticate"
AuthUserFile /etc/httpd/.htpasswd
Require valid-user
新增密碼檔及帳戶 指令:
htpasswd -c /etc/httpd/.htpasswd username
輸入二次密碼
測試:
瀏覽器開啟網頁必須輸入帳號密碼
修改httpd.conf
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
.htaccess其它應用
php_value include_path ".:/usr/local/lib/php"
php_flag display_errors Off
php_value upload_max_filesize 2M
php_value auto_prepend_file "../auto_prepend.php"
Add Comment
Fill out the form below to add your own comments.Release
MD5 checkMd5Sum
Driver