Weird domain stuff

Hello,

This would be caused because the virtualhost for your hostname comes before the virtualhost for your domain and the hostname virtualhost doesn't have the www server alias. The hostname happens to be the same thing as the domain, so requests going to www.domain.com will be picked up by the second virtualhost, while domain.com will be be picked up by the first, "base" virtualhost, which is used for catching the ip.

This is probably very confusing, but the point is that the domain has 2 virtual hosts, 1 in /etc/httpd/conf/httpd.conf and one in your admin's user directory.

John
 
Ah, I unserstand. So edit the one out of /etc/httpd/conf/httpd.conf and restart apache?
 
Yes you can, BUT if you take them out, when you go to the main ip, it'll go to the first virualhost in the list.. which may be one of your user's sites... you may not want that.. so maybe just change the ServerName in the main httpd.conf file to localhost or something like that to prevent somebody else from hogging all hits to the ip, without a domain.

John
 
For some reason my server was setup with a domain other than mine as the default admin one. Is there a way that I can change the default domain for the admin account to say liquenox.net ? Having it setup the way it is seems strange to me.
 
You can try to delete it, but if its the 'main domain' for the admin user, it will probably whine and say you can't. If you want to delete it, you can edit the file:
/usr/local/directadmin/data/users/admin/domains/servername.com.conf

and set
defaultdomain=no

which will allow you to delete it. Just make sure you have the main httpd.conf setup to go *somewhere* and you should be fine.

Also watch out for the ~/public_html soft link.. which is used for accessing sites through domain.com/~username... it will be pointing to nowhere for admin.

John
 
Back
Top