PDA

View Full Version : Weird domain stuff


l0rdphi1
06-22-2003, 04:14 PM
I added an addon domain to my admin account and when I go to http://liquenox.net it works fine, but when I try http://www.liquenox.net it's acting like if I went to http://65.60.32.141 (the server IP)

I have no idea what's going on here :)

DirectAdmin Support
06-22-2003, 04:24 PM
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

l0rdphi1
06-22-2003, 04:27 PM
Ah, I unserstand. So edit the one out of /etc/httpd/conf/httpd.conf and restart apache?

DirectAdmin Support
06-22-2003, 04:29 PM
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

l0rdphi1
06-22-2003, 04:31 PM
OK. I'll give it a shot :)

l0rdphi1
06-22-2003, 05:04 PM
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.

DirectAdmin Support
06-22-2003, 05:20 PM
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

l0rdphi1
06-22-2003, 05:22 PM
Okay thanks a ton :)

l0rdphi1
06-22-2003, 07:18 PM
I got everything working properly. Thank you John :)

Phi1.