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

标签 linux apache security ssl xampp

我正在尝试在 Linux 中使用 XAMPP 在 apache 网络服务器中执行 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)

最佳答案

这里是 Bitnami 开发者,

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

请尝试修改此文件。您可以检查是否有任何其他进程使用端口 443 运行命令 sudo netstat -vnpa | grep 443

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

问候,

贡萨洛

关于linux - 配置 Apache Web 服务器以执行 SSL 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30957574/

相关文章:

python子进程popen将主目录设置为cwd

apache - 如何使用延迟对 apache 进行基准测试?

apache - 在 apache conf 中包含外部文件

amazon-web-services - 如何了解授予用户的所有 AWS IAM 权限

javascript - while 循环中的提示作为密码输入有多安全?

linux - 没有权限更改 docker 容器内的 tty 模式

linux - 如何将端口绑定(bind)到本地主机?

php - "connection rejected by remote interface"使用 PDO 连接到 Firebird 3

apache - 是否可以在 httpd.conf 中使用变量

php - SQL 注入(inject) - 这(oneliner)安全吗?