You are not logged in.
This is strange. I'm using Apache server, and have problem with virtual hosts. For example I have a host:
<VirtualHost myhost.localhost:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/srv/http/projects/2014/myhost.pl/public_html"
ServerName myhost.localhost
ServerAlias www.myhost.localhost
ErrorLog "/var/log/httpd/myhost.localhost-error_log"
CustomLog "/var/log/httpd/myhost.localhost-access_log" common
<Directory "/srv/http/projects/2014/myhost.pl/public_html">
AllowOverride All
Options Indexes FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
I also added a
127.0.0.1 myhost.localhost
line to /etc/hosts file.
Now when I restart my computer myhost.localhost will show me default "It works!" message, and just after "sudo systemctl restart httpd" the proper website will appear under this address. Why is that?
Offline
Not sure what your actual hostname is; but this is probably related to DNS not being available at boot. Depending on your actual name; apache might listen on the wrong interface / source-address for this domain; which is only fixed by restarting it when you have a working dns-server.
Offline
Read this article Issues Regarding DNS and Apache HTTP Server
Offline