トップ «前の日記(2003-04-29) 最新 次の日記(2003-05-03)» 編集

分身日記

過去の日記

2003-04-30 Apache覚書 [長年日記]

[Apache]の設定

Apache が動いたので、tDiary でもと思ってインストールしてみた。はまった(^^;)

ということで健忘症ゆえ以下にメモ。。。

[Apache]httpd.conf の userdir 関連変更

httpd.conf


   AllowOverride All
   #AllowOverride FileInfo AuthConfig Limit Indexes
   Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
   
       Order allow,deny
       Allow from all
   
   
       Order deny,allow
       Deny from all
   

本当に

AllowOverride All

としてよいのかわからないけど、こうしないと、.htaccess が有効にならないのよね。
さらに

Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

の Indexes を削除すれば、指定ファイルが無い場合のインデックスリスト表示を抑制できるみたいだけど、ま、今のこところ便利なのでこのままにしてみる。

[Apache].htpasswd 作成の注意

cygwin で パスワードを設定する場合

$ htpasswd -c -m .htpasswd user

と -m オプションを忘れずに。これは、Winでの標準なので。はまりました(^^;) 素直に、Apache/bin の htpasswd.exe を使えばよかった。。。 この辺参照。

    $ htpasswd /?
    Usage:
            htpasswd [-cmdps] passwordfile username
            htpasswd -b[cmdps] passwordfile username password
    
            htpasswd -n[mdps] username
            htpasswd -nb[mdps] username password
     -c  Create a new file.
     -n  Don't update file; display results on stdout.
     -m  Force MD5 encryption of the password.
     -d  Force CRYPT encryption of the password (default).
     -p  Do not encrypt the password (plaintext).
     -s  Force SHA encryption of the password.
     -b  Use the password from the command line rather than prompting for it.
    On Windows, TPF and NetWare systems the '-m' flag is used by default.
    On all other systems, the '-p' flag will probably not work.
[]