配置Apache Web服务器以执行SSL身份验证

时间:2015-06-20 18:39:05

标签: linux apache security ssl xampp

我正在尝试使用Linux中的XAMPP在apache Web服务器中执行SSL身份验证。在我像这样配置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)

1 个答案:

答案 0 :(得分:2)

Bitnami开发人员,

在XAMPP中,SSL配置位于/opt/lampp/etc/extras/httpd-ssl.conf文件,其中已在端口443中配置了默认的VirtualHost,并且您尝试再次绑定同一端口。

请尝试修改此文件。您可以使用端口443运行命令sudo netstat -vnpa | grep 443

来检查是否有任何其他进程

“Apache服务器无法启动”是什么意思?使用/opt/lampp/ctlscript.sh脚本重新启动Apache服务器并没有在我这边产生任何错误消息,但是error_log告诉了我你提到的相同内容。

此致

的Gonzalo