Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm learning to use cpanel whm on a brand new dedicated server which address is like kb4343.domain.com . I created an account (say "example").

I would like that if people access http://kb4343.domain.com, they see the website created under account "example".

How can i do that? And if it is not possible, where should i put the website in cpanel file directory so that it become the "live" website for that address ?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

http://kb4343.domain.com/~cpanelusername

where cpanelusername is the username of the cpanel account you want to visit

NOTE: you need to have mod_userdir protection disabled for the accessing domain (eg kb4343.domain.com) or completely disabled for it to work

ALSO: if you use an app like wordpress that auto 301's to the desired url you will need to override it to the http://kb4343.domain.com/~cpanelusername type url via the web apps configuration otherwise it wont work

you want a different website/page to come up if you load that hostname? then you need to chuck the files in: /usr/local/apache/htdocs, bear in mind this will come up for any site that points at the server but isnt setup in whm or if they access via the IP without the ~username url added

share|improve this answer
    
Thanks. So, there is no way to map the ip address directly to a given account's domain localroot? –  pixeline Oct 12 '11 at 10:40
    
not unless its a dedicated IP - if its a dedicated IP for the site, loading the IP will load that site –  anthonysomerset Oct 12 '11 at 11:31
    
well, the server has a dedicated IP. Since it's the only site that will be hosted there (with 2 subdomains), I suppose i could do that. –  pixeline Oct 12 '11 at 14:32
    
if its the only ip on the server, cpanel wont work like that, if its an extra IP then sure just move the account to the dedicated IP, however anyone visiting the other ip will still get cpanel default page –  anthonysomerset Oct 12 '11 at 15:04
    
OK i'll stick to your suggest andswer. Thanks a lot for your time Anthony! –  pixeline Oct 12 '11 at 15:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.