/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>
となります。