Score:0

Apache2 Doesn't Work - Nameserver isnt correct

in flag

I want to give a HTTPS connection to my website, so I created a SSL Certificate. When I try to restart Apache2, it throws this error:

Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message This is my config (in /etc/apache2/sites-enabled)

<VirtualHost *:443>

        ServerAdmin [email protected]
        DocumentRoot /var/www/html
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
        SSLCertificateFile /etc/ssl/private/apache-selfsigned.key

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

How can I fix it?

Score:-1
cn flag

Please add

ServerName example.com

on webserver conf and try to reload webserver .

EnderF5027 avatar
in flag
Nothing happened. I tried example.com and my domain too but i didn’t work. For reload, I used sudo systemctl reload apache2
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.