apachecentoswildcard-subdomain

"Apache is functioning normally" on server wildcard subdomains


I have a website that use wildcard-subdomain to change languages. I work fine in localhost.

When I upload to server, the default pages work fine but when I switch to English like this

nghiemthu.net to en.nghiemthu.net

only appear the message:

Apache is functioning normally

Please help.


Solution

  • You should have somewhere in /etc/httpd/ a file with ServerName nghiemthu.net (probably inside a <VirtualHost *:80>).

    You need to declare the other domains to serve with ServerAlias.

    Here, it seems (you didn't post your configuration so I'm guessing) the request doesn't match any virtual host and goes to the default one (serving the default html file).

    See also ServerName and name-based virtual hosts.