Question

Apache Virtual Host ServerName

Hi,

I was trying to set up a (test) virtual host with Apache2 on Ubuntu but I get this error :

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

I do not understand since I already created this :

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName your_domain
    ServerAlias www.your_domain
    DocumentRoot /var/www/your_domain
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Thanks for answering and sorry for (eventual) bad English!


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

Hi @Asmorgrym,

Can you please confirm how did you create this, is it a separate file, in which folder did you create it?

Additionally, for the following settings:

    ServerName your_domain
    ServerAlias www.your_domain
    DocumentRoot /var/www/your_domain

Did you use an actual domain or you used your_domain as a setup?

Regards, KFSys