Thread:Project:Support desk/Problems changing $wgServer to CNAME/reply (2)

When I setup the Wiki, initially, I just used the hostname of the server. Let's call it Server01. If I set $wgServer to either the hostame(Server01) or the IP address, everything is fine. After the initial config, I created a CNAME in DNS, let's call it Wiki. I'm able to, successfully, type in http://wiki/ and have Apache redirect to the mediawiki site; however, upon redirection, the URL changes back to the hostname(Server01). So, rather than the URL showing http://Wiki/wiki/main_page, it changes it back to http://server01/wiki/main_page. To correct this, I changed $wgServer to "http://wiki.mydomian.com", and the formatting is gone. Is the $wgServer variable cached somewhere, or stored in the DB somewhere?