Report this

What is the reason for this report?

Apache Virtual Host ServerName

Posted on November 2, 2020

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!



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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.