I have a server running Ubuntu 16.04.2 LTS with apache2.4 and a VirtualHost that should connect my domain to a given subfolder /var/www/html/mysite.com/public_html
My problem is that when I try to open my domain in a browser I get the error
Now, I'm fairly new to having my own server, but to me "in principle" everything looks fine:
apache2ctl -S tells me that my VirtualHost configuration is okay.
The DNS configuration looks good, for example, https://mxtoolbox.com/ returns the correct Nameservers.
What is especially confusing is that I have set up Reverse DNS for the IP address of my server such that it points to my domain. This Reverse DNS works perfectly, although my domain itself doesn't work.
When I call the IP address of my server it shows me successfully the index.html file that lies in the /var/www/html/mysite.com/public_html folder. This folder is only specified in the VirtualHost
file. I checked this by changing the folder and the file.
Therefore, when I call the IP of my sever in my browser he is able to connect this to mysite.com and the corresponding folder+file. But when I call my domain directly I get an error. ( I used additionally NSLOOKUP XXX.XXX.XXX.XXX to verify that I get mysite.com. However, when I try NSLOOKUP mysite.com I get "mysite.com was not found by Unknown").
What could be the cause for this error?