hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : cPanel before DNS propagation
Reply

Forum Jump

cPanel before DNS propagation

Reply Post New Thread In Hosting Software and Control Panels Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Eternal Member
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,059

cPanel before DNS propagation


When I get a new hosting customer, in my Welcome Email, I tell them that before DNS propagation, they can point to their site at http://IPaddress/~username . This is a shared hosting account, BTW.

Pointing to the above address works, but the URL in the address bar changes to http://www.anothercustomer.com/~username where anothercustomer.com is another customer that I have on the server.

Why does it do that? I think someone told me once before that cPanel automatically defaults to the first site that was ever set up on that server. Frankly, I don't know if this is true, because I can't remember the first domain I set up on this server.

Nonetheless, how do I change this? This customer (anothercustomer.com) emailed me asking why he sees traffic in his logs that are a result of other sites. It's not much BW used, but if I had a choice, I'd rather change it to point to one of my sites.

So how do I address this?

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials



Sponsored Links
  #2  
Old
Web Hosting Master
 
Join Date: Feb 2003
Location: Providence, RI
Posts: 1,512
The first 'website' ever setup in the server should most likely be your hostname, therefore, most cpanel servers will forward the address ip_addr/~username to <hostname>/~username. I am pretty positive about this, at least all my servers act as it is.

To see what website is first created, login as root - click Show IP Address Usage under IP functions in WHM. You will see bunches of domain names right beside your main server IP. The first appears in the list should be the first website you created. As I said, all my servers appear the server hostname.

In WHM, there is also a new feature called 'Tweak Security' - 'mod_userdir Tweak'. Try include the protection in all websites except for "DefaultHost" (if you have one). One of my servers do not have that, but it has the server hostname (The first domain in the list.)

That's pretty much I know. Let me know if this helps, I am sorry if it doesn't.

  #3  
Old
Eternal Member
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,059
Thanks for the info. I've learned something new.

However, I'm still unclear on what to do to change the "default" site from my customer's site to one of my sites. I looked at "mod_userdir Protection" but I'm not clear on what to do.

BTW, when I clicked "Show IP Address Usage", indeed the very first site that showed up was the one that seems to be the "default" site used. The problem is that I want to change that to one of mine...

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials

Sponsored Links
  #4  
Old
Web Hosting Master
 
Join Date: Oct 2002
Location: Brooklyn NY
Posts: 817
Go to your httpd.conf and move your virtualhost up so it becomes the first one under NameVirtualHost. That will make it the default.

__________________
Why do they call them fingers? I never seen them fing. Oh, there they go.


  #5  
Old
Web Hosting Master
 
Join Date: Feb 2003
Location: Providence, RI
Posts: 1,512
As interesting as this is, I've looked around the cpanel scripts and found the solution as below:

vi /usr/local/apache/conf/httpd.conf
/<VirtualHost main_ip> ; search for the line in vi editor

It should appear similiar as below:

<VirtualHost main_ip>
BytesLog domlogs/somedomain_or_servername-bytes_log
ServerName somedomain_or_servername
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>

Change the value of somedomain_or_servername to the name you want your clients to be redirected to when they hit http://<ip_address>/~client_username

/sbin/service httpd restart

Make sure you have an A record for whatever name you have setup above. So edit the DNS entry and restart DNS service.

To double make sure, /sbin/service cpanel restart

Then now login to WHM as root, view the Show IP Address Usage, your new name should be appear in the first place of the list.

Then it's all set. I hope this solves the problem.

  #6  
Old
Eternal Member
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,059
Damn. I just knew you guys would end up telling me to SSH into my site to fix the problem. I really REALLY suck at shell commands. If I have to, I suppose I will have to do it. But is there a way to do it within WHM instead?

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials

  #7  
Old
Web Hosting Master
 
Join Date: Feb 2003
Location: Providence, RI
Posts: 1,512
I don't think you can edit the httpd.conf via WHM. Unless you have setup your ftp configuration at some point to allow root ftp into the server. Then you can download the file and edit on your computer, upload it, restart services through WHM.

Follow these steps, you will have it done at no time.

- Download Putty - Run it - type <yourserverIP> into the Host Name field - select SSH - click Open

- Whatever warning message pop up, just click Yes. Then enter your username as root, and your root's password.

- In the shell, type vi /usr/local/apache/conf/httpd.conf

- Then in vi editor, type /<VirtualHost main_ip>. This is to search for the matched string. Of course, replace the 'main_ip' to the real ip address.

- The configuration should look like the following:

<VirtualHost main_ip>
BytesLog domlogs/somedomain_or_servername-bytes_log
ServerName somedomain_or_servername
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>

- Click i. This allows you to type.

Then you can edit them just link you edit a document at Microsoft Word.

- After you have done, click Esc, follow by :wq. This step will save the file and quit the vi editor.

- Then, login to WHM as root and restart Apache.

I've checked all the mis-typed thing, so just follow exactly the command I used in bold

  #8  
Old
iNET Interactive
 
Join Date: May 2001
Location: Dayton, Ohio
Posts: 4,897
Quote:
Originally posted by vito
Damn. I just knew you guys would end up telling me to SSH into my site to fix the problem. I really REALLY suck at shell commands. If I have to, I suppose I will have to do it. But is there a way to do it within WHM instead?

Vito

Afraid thats all you can do to fix this...

__________________
-Mat

Reply

Related posts from TheWhir.com
Title Type Date Posted
Hulk Hogan's Hostamania Announces Partnership with cPanel Web Hosting News 2013-12-10 12:12:09
GoDaddy Supports cPanel as Part of Web Hosting Updates Web Hosting News 2014-05-09 12:40:20
cPanel & WHM Software 11.36 Reaches Stable Tier Status Web Hosting News 2013-04-09 11:44:33
cPanel Security Updates Address Perl Module Vulnerabilities Web Hosting News 2012-12-06 12:55:54
Hosting Control Panel cPanel & WHM 11.34 Release Hits Stable Tier Web Hosting News 2012-11-12 17:04:57


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?