DirectoryIndex :ディレクトリインデックスコマンド
DirectoryIndex index.html index.htm index.shtml
URLがディレクトリをアクセスした時に返すファイル名を指定できる
左から優先順位が高い
Optionsコマンド [引数1] [引数2] .....
例) Options Indexes FollowSymLinks ExecCGI
Indexes ディレクトリ内のファイル一覧表示を許可
FollowSymLinks ディレクトリ内のリンクを辿れる
ExecCGI CGIの実行を許可
None すべての機能を無効
Directoryディレクティブ:URLが特定のディレクトリをアクセスしたときに
そのアクセスに対して条件・制御などを設定できる
<Directory "/home/www/htdoc/myproj">
コマンド1
コマンド2
.....
</Directory>
Requireコマンド
Require all granted すべてのアクセスを受け付ける
AllowOverride コマンド <Directory> ディレクティブの中で定義する
例)
<Directory "/home/www/">
AllowOverride All /home/WWW/以下のディレクトリで設定の上書き許可
</Directory>
<Files ".ht*"> .ht* で.htaccess .httpd.confなどが対象 Require all denied 上記マッチするファイルのアクセス禁止 </Files>
<IfModule mod_rewrite.c> <-リライトモジュールが利用できるか?
RewriteEngine on <-リライトエンジンの有効化
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>