Simple Apache question...
I have created a new MySQL droplet (using the DO MySQL marketplace image) which comes preconfigured with a default web page which seems to work fine. I now want to assign a subdomain name (e.g., db.example.com) to this server. I had the impression the only thing I needed to do are the following steps:
- Set a DNS A record to point db.example.com to the server’s IP address
- Add line
systemctl reload apache2
Unfortunately, that did not work. When I enter
apachectl configtest the following message is displayed:
AH00558: apache2: 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
That sounds like Apache doesn’t see my ServerName line in file
000-default.conf, which I don’t understand. So, I added the
ServerName db.example.com line to the
apache2.conf file as the message suggests.
apachectl configtest now shows “Syntax OK”, but when I enter
a2ensite db.example.com it displays:
ERROR: Site db.example.com does not exist!
Does anyone see what I’m doing wrong?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×