「ドキュメントルートの設定」の編集履歴(バックアップ)一覧はこちら
「ドキュメントルートの設定」(2011/07/31 (日) 14:10:10) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
/var/www/html(ドキュメントルート)を設定します。
/etc/httpd/conf/httpd.conf
内から、設定にかんする記述(ディレクティブ)を以下に抜粋します。
※シャープ(#)の部分はコメントになります。
<Directory /var/www/html>
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
/var/www/html(ドキュメントルート)を設定します。
/etc/httpd/conf/httpd.conf
内から、設定にかんする記述(ディレクティブ)を以下に抜粋します。
※シャープ(#)の部分はコメントになります。
<Directory /var/www/html>
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
コメント部分を省略します。
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
以上、4つのディレクティブの説明を書きます。
Options ⇒ ディレクトリ構造の表示が必要でなければIndexesを削除
AllowOverride ⇒ ドキュメントルートを貸出、ディレクトリの制御を他の人に任せる場合の設定をします。
今回は任せたりしないので、Noneのままです。
Order allow,deny ⇒ コンテンツをすべてに公開するかどうか。
公開用サーバなのでAllow from all
以上を踏まえたうえでの設定は
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
となります。
表示オプション
横に並べて表示:
変化行の前後のみ表示: