|   HOME  |   ゲストブック  |   掲示板  |     |   更新履歴  |   リンク  |   お問合せ  

httpd.confの設定例


■ httpd.confの設定
 apacheをインストールしたままの状態で利用する場合、以下の説明は必要ありません。その場合のドキュメントフォルダはC:\usr\apache\htdocs、cgiはc:\usr\apache\cgi-binを使います。セキュリティに関する対策は必要です。
HTML Documentフォルダ


 http.confの説明は、図に示したような階層の下で利用するものと仮定します。

説明上の数字は、httpd.conf(ver1.3.22)の行番号を表します。他バージョンでもその付近の行に有ると思います。

尚、詳細な説明については、割愛させていただきます。








変更個所を赤い文字で表しています。青い文字は、コメントを外す個所です。

htmlフォルダの設定
index.htmlなどのドキメントを\public_htmlの下に設置するには、以下の2箇所を修正します。

301: DocumentRoot "c:/usr/Apache/htdocs"
    DocumentRoot "c:/home/htdocs/public_html"

326: <Directory "c:/usr/Apache/htdocs">
    <Directory "c:/home/htdocs/public_html">

~(チルダ)の指定
http://www.huonpine/~indataのようにチルダを利用する場合は、326行のようにc:/homeまでの記述にし、360行は*のマルチ設定にします。

326: <Directory "c:/usr/Apache/htdocs">
    <Directory "c:/home">

360: UserDir "c:/usr/apache/users"
    UserDir "c:/home/*/public_html"

cgi-binフォルダの設定
610: ScriptAlias /cgi-bin/ "c:/usr/apache/cgi-bin/"
    ScriptAlias /cgi-bin/ "c:/home/htdocs/public_html/cgi-bin/"

616: <Directory "c:/usr/apache/cgi-bin">
   <Directory "c:/home/htdocs/public_html/cgi-bin">

843: #AddHandler cgi-script .cgi
     AddHandler cgi-script .cgi

shtmlの設定
shtmlに対応させるには、次の4箇所を修正します。
335: Options Indexes FollowSymLinks MultiViews
    Option Includes Indexes FollowSymLinks MultiViews

385: DirectoryIndex index.html
    DirectoryIndex index.html index.shtml

848#AddType text/html .shtml
     AddType text/html .shtml

849: #AddHandler server-parsed .shtml
     AddHandler server-parsed .shtml

htaccessに対応させます。
342: AllowOverride None
    AllowOverride All

以上の個所を変更する事で、取合えず動くはずです。



cgiをcgi-bin以外で使う場合は、335行に以下のように追加します。

335: Options Indexes FollowSymLinks MultiViews
    Option Indexes FollowSymLinks MultiViews ExecCGI

cgiをcgi-bin以外とshtmlの両方を使う場合は、次のようにAllを定義します。

335: Options Indexes FollowSymLinks MultiViews
    Option All
- ご案内 -
まえがき
 何が必要ですか
 メリット
 デメリット
 番外
 お約束ごと

サーバ設置の前準備
 ハードウェア
 その他,ハードウェア
 ソフトウェア

Win2000 セットアップ
 セットアップFDの作成
 クリーンインストール
 インストールの注意
 SPのインストール
 セキュリティの設定

サーバのセットアップ
 共通のフォルダ
 WWWサーバ
 httpd.confの設定例
  apacheセキュリティ対策
  バーチャルホスト設定
  perlのセットアップ

FTPサーバ
  WarFTPインストール
  WarFTPセットアップ
  WarFTPセキュリティ対策

Mailサーバ
  ArGoSoftのセットアップ

ルータの設定
サーバの公開
2002.07.31 広告強制撤去
2002.02.06
2002.02.04
2001.12.30

Copyright© huonpine.net,All right reserved