apache - 本地 Apache2 实例的 ServerName

标签 apache ssl

我想创建自己的自签名 SSL 证书并将其添加到本地 Apache2 实例(即将 http://localhost/ 更改为 https://localhost/ )。但是,我停留在将什么放在 default-ssl.conf 文件中的服务器 IP 下的部分。我指的是 this resource创建 SSL 证书。我尝试将“127.0.0.1”、“localhost”和私有(private) IP 地址(在本例中为 10.0.2.15)放在“ServerName”部分下。但是,它仍然失败并出现以下错误。

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(13) Permission denied: make_sock: could not bind to addres 0.0.0.0:80
no listening sockets available, shutting down

任何人都可以就哪里出了问题给出一些提示吗?为什么服务器名称错误,我的想法(或谷歌的东西)已经用完了......

我的 default-ssl 文件的前几行:

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
    ServerAdmin temp@temp.com
    ServerName localhost

最佳答案

具有讽刺意味的是,这个问题似乎已经自行解决了......不太确定发生了什么,但现在我面临另一个问题(我在 Unable to change the document root of https://localhost/ 上发布)

我保留了原样的代码:

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
    ServerAdmin temp@temp.com
    ServerName localhost

关于apache - 本地 Apache2 实例的 ServerName,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41788980/

相关文章:

python - "Correct"在python网站中存储postgres密码的方法

python - 使用 Pywinrm 和 ssl 连接

java - 如何修复 "javax.net.ssl.SSLHandshakeException: TLS Server certificate issued after 2019-04-16 and anchored by a distrusted legacy Symantec root CA"

ssl - 由于 LB 运行状况检查,Vault 节点中的连续 TLS 握手错误日志

apache - 无法识别一个网站如何重定向到另一个网站

php - htaccess 代码分解和一些解释

apache - 什么会导致带有 Railo 4 和 mod_cfml 的 tomcat 404 用于 SES urls like/index.cfm/event/main.home?

php - WAMP/XAMPP 在 localhost 上的响应非常慢

apache - 用于判断网站是启动还是关闭的批处理脚本

android - (a) 击打 : TLS socket is closed when trying to login with XMPP