配置Apache Web服务器以执行SSL身份验证
问题描述:
我试图在Linux Web服务器中使用XAMPP执行SSL身份验证。在像这样配置httpd.conf之后,Apache服务器无法启动。有人能帮我解决这个问题吗?我的配置有什么问题?配置Apache Web服务器以执行SSL身份验证
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] AH: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
答
Bitnami开发商这里,
在XAMPP SSL配置位于/opt/lampp/etc/extras/httpd-ssl.conf
文件,其中有一个默认的虚拟主机已经在端口配置443,并且您正试图再次绑定相同的端口。
请尝试修改此文件。您可以检查是否有任何其他进程使用端口443运行命令sudo netstat -vnpa | grep 443
你是什么意思“Apache服务器无法启动”?使用/opt/lampp/ctlscript.sh
脚本重新启动Apache服务器并不会在我身边产生任何错误消息,但error_log
告诉我您提到的相同。
问候,
贡萨洛
+0
谢谢。有效。 – lpsandaruwan
如果它未能启动,大概是记录一些错误,可能有助于确定问题。你的Apache错误日志中有什么? – larsks
是的,我编辑了这个问题。谢谢。 – lpsandaruwan