
Apache と mod_ssl を使用してローカル (開発/テスト目的) に SSL サイトをセットアップしようとしていますが、VirtualHost ファイルの内容は次のとおりです。
/etc/httpd/conf.d/local.conf
<VirtualHost *:80>
ServerName reptool.dev
DocumentRoot /var/www/html/magnific/reptooln_admin/web
<Directory /var/www/html/magnific/reptooln_admin/web>
# enable the .htaccess rewrites
AllowOverride All
Order allow,deny
Allow from All
</Directory>
ErrorLog /var/log/httpd/reptool-error.log
CustomLog /var/log/httpd/reptool-access.log combined
</VirtualHost>
/etc/httpd/conf.d/local-ssl.conf
<VirtualHost reptool.dev:443>
ServerName reptool.dev:443
DocumentRoot /var/www/html/magnific/reptooln_admin/web
<Directory /var/www/html/magnific/reptooln_admin/web>
# enable the .htaccess rewrites
AllowOverride All
Order allow,deny
Allow from All
</Directory>
ErrorLog /var/log/httpd/reptool-error.log
CustomLog /var/log/httpd/reptool-access.log combined
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
</VirtualHost>
最初のもの (非 SSL) は問題なく動作しますが、SSL のものではエラー 404 が発生しませんでした。
The requested URL /app_dev.php was not found on this server.
なぜですか? 構成レベルで何が欠けているのでしょうか?
答え1
ServerName「reptool.dev:443」は正しくないようです。ポートが含まれていないはずです。次を試してください:
ServerName reptool.dev