やりたいこと
EC2内にApacheを準備し、その前にELBを立てて、httpsでアクセスされた時に
SSL接続をさせたい。
(httpアクセス時のリダイレクトは今回は考えない)
現状
httpでアクセスする分には問題なく、表示がされます。
一方、httpsでアクセスすると下記のようになりアクセスできません。
この時のApacheのaccess_logは以下のとおりです。
10.0.2.110 - - [25/Jun/2017:15:57:30 +0000] "GET / HTTP/1.1" 302 -
設定として怪しいのがELBかなと考えております。
理由は、以下の画像のようにヘルスチェックが効いていないからです。
また、Apacheの設定内容も不安です。
conf/httpd.confファイルとconf.d/test.conf(仮名)ファイルは以下のようになっております。
【conf/httpd.conf】
ServerRoot "/etc/httpd" Listen 80 Listen 443 Include conf.modules.d/*.conf User apache Group apache ServerAdmin root@localhost <Directory /> AllowOverride none Require all denied </Directory> DocumentRoot "/var/www/html" <Directory "/var/www"> AllowOverride None Require all granted </Directory> <Directory "/var/www"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> <Files ".ht*"> Require all denied </Files> ErrorLog "logs/error_log" LogLevel warn <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog "logs/access_log" combined </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" </IfModule> <Directory "/var/www/cgi-bin"> AllowOverride None Options None Require all granted </Directory> <IfModule mime_module> TypesConfig /etc/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType text/html .shtml AddOutputFilter INCLUDES .shtml </IfModule> AddDefaultCharset UTF-8 <IfModule mime_magic_module> MIMEMagicFile conf/magic </IfModule> EnableSendfile on IncludeOptional conf.d/*.conf
【conf.d/test.conf】
ServerName IPアドレス <VirtualHost *:80> Servername IPアドレス DocumentRoot /xxx/xxx/xxx/ <Directory "/xxx/xxx/xxx/"> Options FollowSymlinks AllowOverride All Require all granted </Directory> </VirtualHost>
知りたいこと
原因究明がしっかりと行えておらず、どこが悪いのかわかっておりませんので、
まずはどこがおかしいのかご教授いただけると幸いです。
(これらの情報で足りない場合は、追記いたします)
解決策もご教授いただけると助かります。
何卒、よろしくお願いいたします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。