###前提・実現したいこと
Apache2.2にてVirtualHost機能を使用し設定を行っています。
そこで、Directoryコンテナを明示的に記述しない場合はデフォルト設定が適用されると考えていたのですが、
動作がApacheのドキュメントと違う動作をしてしまいます。
明示的に記述しない場合は何が適用されるか教えて頂けないでしょうか?
###conf
<VirtualHost *:443> DocumentRoot "/var/www/html" ServerName example.com:443 ServerAlias www.example.com ErrorLog logs/ssl_error_log TransferLog logs/ssl_access_log LogLevel warn SSLEngine on SSLCertificateFile /opt/local/ssl/server.crt SSLCertificateKeyFile /opt/local/ssl/key.pem SSLCertificateChainFile /opt/local/ssl/ca.pem </VirtualHost>
###デフォルトの場合
Options ディレクティブ
説明: ディレクトリに対して使用可能な機能を設定する
構文: Options [+|-]option [[+|-]option] ...
デフォルト: Options All
コンテキスト: サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
上書き: Options
ステータス: Core
モジュール: core
URL:Apache コア機能
###試したこと
上記のconfの場合は、Directoryコンテナが無い為、
Optionsディレクティブはデフォルトが適用される為、[Options All]となるはず
Indexesも有効になっているはずなので、ブラウザにて下記URLでアクセスしました。
https://www.example.com/test/
※testディレクトリは存在します
Indexesが有効になってると、ディレクトリ内の一覧が表示されるはずですが、403エラー Forbiddenになってしまいます。
###その他のconfについて
vhost.confにて80ポートの設定はしております。
こちらでは、Optionsディレクティブを設定していますが、
VirtualHostコンテナ内なので、80番ポートのみ反映されると認識ですが、これが間違いなのでしょうか?
<VirtualHost *:80> ServerAdmin example@example.com DocumentRoot /var/www/html ServerName example.com:80 ServerAlias www.example.com ErrorLog logs/error_log CustomLog logs/access_log combined <Directory "/var/www/html"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <Directory "/var/www/cgi-bin"> AllowOverride All Options FollowSymLinks ExecCGI Order allow,deny Allow from all </Directory> </VirtualHost>
回答1件
あなたの回答
tips
プレビュー