本地Apache2实例的ServerName

时间:2017-01-22 08:46:21

标签: apache ssl

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

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

1 个答案:

答案 0 :(得分:0)

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

我保持代码原样:

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