我想创建自己的自签名 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/