OSDN Git Service

Update .htaccess and .htpasswd
authorhenoheno <henoheno>
Sun, 24 Apr 2005 11:52:37 +0000 (20:52 +0900)
committerhenoheno <henoheno>
Sun, 24 Apr 2005 11:52:37 +0000 (20:52 +0900)
* Added basic-auth related sample into .htaccess
* Newly added .htpasswd with sample and notices
* Added sample not to direct-access to .ht* files

.htaccess
.htpasswd [new file with mode: 0644]

index 7242002..f38c623 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,18 +1,37 @@
-## Access control needs 'AllowOverride Limit' at httpd.conf.
+# Apache .htaccess
+# $Id: .htaccess,v 1.11 2005/04/24 11:52:37 henoheno Exp $
+#
+# NOTE: Correct permission of this file 644(or 604)
+
+## Access control by Order/Allow/Deny directives
+## needs 'AllowOverride Limit' at httpd.conf
+
+# Prohibit direct access to .htaccess, .htpasswd or others
+# (If it's not set by default)
+#<FilesMatch "^\.ht">
+#      Order allow,deny
+#      Deny from all
+#</FilesMatch>
+
+# Prohibit direct access
 <FilesMatch "\.(ini\.php|lng\.php|txt|gz|tgz|zip)$">
        Order allow,deny
        Deny from all
 </FilesMatch>
 
-## Using zlib.output_compression per directory (via .htaccess),
-## needs 'AllowOverride Options' at httpd.conf.
-## See BugTrack/738 for detail
+## Access control to this directory via Basic-auth
+## needs 'AllowOverride AuthConfig' at httpd.conf
+#AuthType Basic
+#AuthName      "Authentication required"
+#AuthUserFile  /server's/absolute/path/to/.htpasswd
+#AuthGroupFile /dev/null
+#Require       valid-user
+
+## Using zlib.output_compression per directory (via .htaccess)
+## needs 'AllowOverride Options' at httpd.conf
 ##
 ## NOTE:
 ##   Define PKWK_ZLIB_LOADABLE_MODULE somewhere if you are using
 ##   PHP extension as loadable module (especially FreeBSD ports)
-##
-##   Bug #29350 output_compression not working with zlib as loadable module
-##   http://bugs.php.net/bug.php?id=29350
-##
+##   (See BugTrack/738 for detail)
 #php_flag zlib.output_compression On
diff --git a/.htpasswd b/.htpasswd
new file mode 100644 (file)
index 0000000..5ef63be
--- /dev/null
+++ b/.htpasswd
@@ -0,0 +1,13 @@
+# Apache AuthUserFile (See .htaccess)
+# $Id: .htpasswd,v 1.1 2005/04/24 11:52:37 henoheno Exp $
+#
+# NOTE:
+#  * user:password
+#  * Correct permission of this file 644(or 604)
+#  * Prohibit direct access to this file (See .htaccess)
+#  * You can use md5-plugin 'PHP/LDAP crypt' without
+#    scheme-prefix, to generate password
+
+## Sample: guest/guest(MD5 crypt), guest2/guest2(legacy crypt)
+#guest:$1$diwHVvEW$0YKANlf0tAczUU01LygP/.
+#guest2:0dHeae8zgzNFU