Wednesday, October 16, 2013, 08:15 - Blog網誌
Posted by Administrator
Apache htaccess網頁認證設定 - Linux ServerPosted by Administrator
網頁目錄下編輯檔案 .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
( 384 views )
| 0 trackbacks
| permalink
| related link
| ( 3 / 518 )
Release
MD5 checkMd5Sum
Driver