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:
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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!