Virtual Hosts not working

Posted September 12, 2019 3.1k views
MySQLApachePHPLAMP StackUbuntu 18.04Databases

After Setting Up my Virtual Hosts when i run [sudo apache2ctl configtest] i get this message below please how can i fix it ?

AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using Set the ‘ServerName’ directive globally to suppress this message
Syntax OK

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.

Submit an Answer
2 answers


The message that you are getting is only a warning and would not prevent your Apache and Vhost from working. As long as you get the Syntax OK at the end then the Apache restart should work as normal.

If your Virtual Host is still not working, feel free to share the content here and I could try to advise you further.


hello please mine shows syntax ok, but it wont connect if i try to access the site in the vhost. it took longer time to load and when done loading it sent an error messege