I've some problems to configure Apache2
My server has a second IP address that I've added under /etc/network/interfaces with:
I can ping my server with this IP without any problems.
Now I want to configure a domain with this IP address on Apache2.
My domain is accessible with domain.tld but Apache shows me the standard website (if no defined rule matches) when browsing to www.domain.tld
My configuration under sites-enabled:
If I change the ServerAlias parameter to
I can access the website trough every subdomain combination but not with www. The DNS entries should be right (A Record for www. and I get the same IP for ping domain.tld and www.domain.tld
But I found out, that if I ping my server with "domain.tld" I get back as answer: www.domain.tld
That's a different behaviour than pinging a domain that uses the server main IP (here I get back srv.myserver.tld which is the correct FQDN).
What is wrong in my configuration?
Hope somebody can help me.