配置 Apache Web 服务器以执行 SSL 身份验证
Configure Apache web server to perform SSL authentication
我正在尝试在 apache 网络服务器中执行 SSL 身份验证,在 Linux 中使用 XAMPP。在我这样配置 httpd.conf 之后,Apache 服务器无法启动。有人可以帮我解决这个问题吗?我的配置有什么问题?
Alias /bitnami/ "/opt/lampp/apache2/htdocs/"
Alias /bitnami "/opt/lampp/apache2/htdocs"
<Directory "/opt/lampp/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Listen 443
<VirtualHost 127.0.0.1:443>
DocumentRoot "/opt/lampp/htdocs"
ServerName localhost.localdomain
SSLEngine on
SSLCertificateFile "/home/lahiru/Desktop/ucsc/security/ssl/server.cer"
SSLCertificateKeyFile "/home/lahiru/Desktop/ucsc/security/ssl/server.key"
SSLVerifyClient require
SSLVerifyDepth 10
SSLCACertificateFile "/home/lahiru/Desktop/ucsc/security/ssl/ca.cer"
</VirtualHost>
Apache 错误日志显示,
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
[Sun Jun 21 07:42:47.000754 2015] [ssl:warn] [pid 1863] AH01909: localhost.localdomain:443:0 server certificate does NOT include an ID which matches the server name
[Sun Jun 21 07:42:47.001082 2015] [ssl:warn] [pid 1863] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 21 07:42:47.001101 2015] [ssl:warn] [pid 1863] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Jun 21 07:42:47.001183 2015] [suexec:notice] [pid 1863] AH01232: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
这里是 Bitnami 开发者,
在 XAMPP 中,SSL 配置位于 /opt/lampp/etc/extras/httpd-ssl.conf
文件中,其中已经在端口 443 中配置了默认的 VirtualHost,而您正在尝试再次绑定同一端口。
请尝试修改此文件。可以查看是否有其他进程使用443端口运行命令sudo netstat -vnpa | grep 443
"Apache server is failing to start" 是什么意思?使用 /opt/lampp/ctlscript.sh
脚本重新启动 Apache 服务器并没有在我这边产生任何错误消息,但是 error_log
告诉我的和你提到的一样。
此致,
贡萨洛
我正在尝试在 apache 网络服务器中执行 SSL 身份验证,在 Linux 中使用 XAMPP。在我这样配置 httpd.conf 之后,Apache 服务器无法启动。有人可以帮我解决这个问题吗?我的配置有什么问题?
Alias /bitnami/ "/opt/lampp/apache2/htdocs/"
Alias /bitnami "/opt/lampp/apache2/htdocs"
<Directory "/opt/lampp/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Listen 443
<VirtualHost 127.0.0.1:443>
DocumentRoot "/opt/lampp/htdocs"
ServerName localhost.localdomain
SSLEngine on
SSLCertificateFile "/home/lahiru/Desktop/ucsc/security/ssl/server.cer"
SSLCertificateKeyFile "/home/lahiru/Desktop/ucsc/security/ssl/server.key"
SSLVerifyClient require
SSLVerifyDepth 10
SSLCACertificateFile "/home/lahiru/Desktop/ucsc/security/ssl/ca.cer"
</VirtualHost>
Apache 错误日志显示,
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
[Sun Jun 21 07:42:47.000754 2015] [ssl:warn] [pid 1863] AH01909: localhost.localdomain:443:0 server certificate does NOT include an ID which matches the server name
[Sun Jun 21 07:42:47.001082 2015] [ssl:warn] [pid 1863] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 21 07:42:47.001101 2015] [ssl:warn] [pid 1863] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Jun 21 07:42:47.001183 2015] [suexec:notice] [pid 1863] AH01232: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
这里是 Bitnami 开发者,
在 XAMPP 中,SSL 配置位于 /opt/lampp/etc/extras/httpd-ssl.conf
文件中,其中已经在端口 443 中配置了默认的 VirtualHost,而您正在尝试再次绑定同一端口。
请尝试修改此文件。可以查看是否有其他进程使用443端口运行命令sudo netstat -vnpa | grep 443
"Apache server is failing to start" 是什么意思?使用 /opt/lampp/ctlscript.sh
脚本重新启动 Apache 服务器并没有在我这边产生任何错误消息,但是 error_log
告诉我的和你提到的一样。
此致,
贡萨洛