How do I create an account for the main domain name?

Feb 25, 2002
9
0
301
I have Cpanel installed on my server, but I am unable to create a Cpanel account for the main domain name. I get an error which states that the domain name already exists in the httpd.conf file and must be removed first. What would I need to remove? Does anyone have experience with fixing this problem?

Thank you,

Shawn
 
Feb 25, 2002
9
0
301
Clarification to Post

To clarify what I mean by &main domain name&, I mean the domain name which is also the hostname of my server.

Shawn
 
B

bdraco

Guest
[quote:a265b8a81d][i:a265b8a81d]Originally posted by cp31[/i:a265b8a81d]

To clarify what I mean by &main domain name&, I mean the domain name which is also the hostname of my server.

Shawn[/quote:a265b8a81d]

Actually you should never do this because then all mail will get routed to the user. Your hostname should be unique to the machine name. It should never be your domain name.
 

sina

Active Member
Mar 7, 2002
38
0
306
so what do you say the solution is , change the server name or could you clearify the solution a bit more

Thank you
 

totalufo

Well-Known Member
Jan 17, 2002
160
0
316
You have to change the server name to yourmaindomain.com
If you have virtual accounts on your server that could cause problems though. If you look in the WHM set up, it says that the servername can not be modified.
 
B

bdraco

Guest
You'll need to change your hostname

Your hostname should be

&choosenname&.&domainname&

Good hostnames (should have 2 dots and be a FQDN):
penguin.cow.net
happy.cow.net
portal.cow.net

Bad Hostnames:
localhost.localdomain
cow.net



--In a root shell----
Modify
/etc/sysconfig/network

Type
hostname &newhostname&
---------------------------

Change the hostname is server setup.
 

sina

Active Member
Mar 7, 2002
38
0
306
but after running
hostname new.domain.com
it wont let us enter the WHM nomore :(
 

rego

Member
Mar 7, 2002
17
0
301
Login by ssh and run /scripts/upcp

This will update your info with cpanel. You can then open whm. Don't forget to add A record to your host name.
 
Feb 25, 2002
9
0
301
Still having problems ...

I have renamed my server from www.domainname.com to tesla.domainname.com. I still can't create a cpanel account
for www.domainname.com. I get an error that states that
the domain name already exists in httpd.conf, and to delete
the entry and try again.

Shawn
 

awsol

cPanel Test Bitch
Feb 8, 2002
591
0
316
Boston MA
Remove it from httpd.conf just as it states. Heres some directions.

First you need to open the file in a file editor. Pico is alot easier for newer people. So I always suggest using it. This would be the command to open the file.

pico /usr/local/apache/conf/httpd.conf

Next you need to search through the file and find the lines for the domain in question. You will see lines like the following.

&VirtualHost 1.2.3.4&
ServerAlias www.DOMAIN.com DOMAIN.com
ServerAdmin [email protected]
DocumentRoot /home/USERNAME/public_html
BytesLog domlogs/DOMAIN.com-bytes_log
User USERNAME
Group GROUPNAME
ServerName www.DOMAIN.com
ScriptAlias /cgi-bin/ /home/USERNAME/public_html/cgi-bin/
CustomLog domlogs/DOMAIN.com combined
ScriptAlias /cgi-bin/ /home/USERNAME/public_html/cgi-bin/
&/VirtualHost&


You want to remove this totally. But make sure you only remove it for the one domain.

So all you need to remove is

&VirtualHost 1.2.3.4&

all the way down to

&/VirtualHost&

Once you remove it hit your control key and O on your keyboard. This will ask you to save the file and overwrite.

Do so and log in to WHM and restart Apache.

This should fix the issue and allow you to create the account. The problem is when you first set up the box you set it to the domain hostname. So it put the stuff in there. Most likely it is set to be looking in /var/www/ I beleive. That's the new default for apache.

On a side note pico has a feature to search files for certain strings. If you wanted to find cpanel.net inside httpd.conf all you need to do is hit control and W on your keyboard. This will ask you for something to search for. Put in cpanel.net and it will find the closet cpanel.net to your current location. Do it as many times as needed to find exactly what you need.

Good luck and I hope these small straight forward directions help you.
 

totalufo

Well-Known Member
Jan 17, 2002
160
0
316
If I'm not mistaken, you can loging via FTP with your root username and password and upload what you want there.
 

marius

Well-Known Member
PartnerNOC
Jun 10, 2002
157
0
316
Bucharest
[quote:2658af2560][i:2658af2560]Originally posted by totalufo[/i:2658af2560]

If I'm not mistaken, you can loging via FTP with your root username and password and upload what you want there.[/quote:2658af2560]


You cannot connect through FTP as root.
 

awsol

cPanel Test Bitch
Feb 8, 2002
591
0
316
Boston MA
[quote:3f0a4c5b4c][i:3f0a4c5b4c]Originally posted by marius[/i:3f0a4c5b4c]

[quote:3f0a4c5b4c][i:3f0a4c5b4c]Originally posted by totalufo[/i:3f0a4c5b4c]

If I'm not mistaken, you can loging via FTP with your root username and password and upload what you want there.[/quote:3f0a4c5b4c]


You cannot connect through FTP as root.[/quote:3f0a4c5b4c]

That is correct but if you download SecureCRT it allows you to FTP over SSH as root.
 

thomas

Well-Known Member
Mar 31, 2002
70
0
306
[quote:286faef4c4][i:286faef4c4]Originally posted by awsol[/i:286faef4c4]
That is correct but if you download SecureCRT it allows you to FTP over SSH as root.[/quote:286faef4c4]

You can?

I have SecureCRT, but never seen any option to FTP over SSH.