简体   繁体   中英

ServerName for local Apache2 instance

I wanted to create my own self signed SSL certificate and add it to the local Apache2 instance (ie changing http://localhost/ to https://localhost/ ). However, I'm stuck at the part on what to put under the server IP in default-ssl.conf file. I'm referring to this resource to create the SSL certificate. I tried putting "127.0.0.1", "localhost" and the private IP address (in this case it's 10.0.2.15) under the "ServerName" part. However, it's still failing with the following error.

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

Can anyone please give some hints on what went wrong? I'm running out of ideas (or things to google) why the server name is wrong...

The first few lines of my default-ssl file:

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

Ironically the issue seems to have resolved by itself... Not too sure what happened but now I'm facing another issue (which I posted on Unable to change the document root of https://localhost/ )

I kept the code as it is:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM