#1 (permalink)  
Old 06-21-2009, 07:18 PM
Registered User
 
Join Date: Feb 2004
Location: Rio de Janeiro
Posts: 44
sergio2004
Problem with IP shared and hostname

Hi,

When a type the shared IP of my dedicated server in the browser, it is showing the first account that I created in the server and it`s begining with the letter "a".

I think that the shared IP in the browser must show the apache/cpanel page and not a customer page.

The begining of the history is in last year, when I bought a SSL and install it in my domain account without any problem.

This year when I went renew the SSL, the WHM shows error because my domain is with shared IP, then the datacenter support said to me put my domain with a dedicated IP and the install of SSL is ok. But the dedicated IP that the DC said to me use is the IP of the ns2. of my domain.

The problem is that the hostname of the server is a subdomain of my domain. Then now the configuration of the server is like the example below.

The hostname: srv.mydomain.com
But srv is a subdomain of my domain
The shared IP is: 74.XXX.XXX.369
The nameservers are:
ns1.mydomain.com with IP 74.XXX.XXX.369
ns2.mydomain.com with IP 74.XXX.XXX.400

The dedicated IP of my domain with SSL is 74.XXX.XXX.400, but in the DNS zone the srv appears like a subdomain with the A entry with the shared IP 74.XXX.XXX.369

All accounts of customers were created with the root owner and with shared IP 74.XXX.XXX.369. My domain is not configured like reseller.

Please, how can I solve this confusion problem?

Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-21-2009, 09:00 PM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,479
Spiral is on a distinguished road
Lightbulb

Apache displays the first site it comes to reading the httpd.conf file
down from top to bottom for the IP that you are trying to access.

Whatever site is listed first in the httpd.conf file for the given IP
is the site that is shown which is generally the "default page"
for Cpanel unless your default page has gotten deleted from
the Apache configuration for any reason (or moved)

Just move whatever site you want to be the default to be
the first one read by Apache or better yet create a new
virtualhost section for that site and put it in to one of the
include files that is run before the virtualhost sections.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-21-2009, 10:42 PM
Registered User
 
Join Date: Feb 2004
Location: Rio de Janeiro
Posts: 44
sergio2004
Hi,

Thank you for your anwser.

The httpd.conf before I put the dedicated IP for my domain is like below. Remember that IP with final number 369 is the shared IP and the IP with final 400 is the dedicated of my domain now and the IP of the ns2.mydomain.com too.

<VirtualHost 74.XXX.XXX.369:80>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
ServerName srv.mydomain.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin suport@mydomain.com
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>


# Default vhost for unbound IPs

<VirtualHost *>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
ServerName srv.mydomain.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin suport@mydomain.com
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>

Then after I install the SSL and put a dedicated IP for my domain like I said, the httpd.conf is like below.

NameVirtualHost 74.XXX.XXX.400:80
<VirtualHost 74.XXX.XXX.400:80>
ServerName srv.mydomain.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin suport@mydomain.com
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>


# Default vhost for unbound IPs


NameVirtualHost 74.XXX.XXX.400:80
<VirtualHost 74.XXX.XXX.400:80>
ServerName srv.mydomain.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin suport@mydomain.com
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>

For solve the problem related, must I edit and change the NameVirtualHost 74.XXX.XXX.400:80 and put the number of shared IP? Is it?

In the old file was
# Default vhost for unbound IPs

<VirtualHost *>


and now is
# Default vhost for unbound IPs


NameVirtualHost 74.XXX.XXX.400:80


Thanks for your help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-22-2009, 11:06 AM
Registered User
 
Join Date: Feb 2004
Location: Rio de Janeiro
Posts: 44
sergio2004
Hi,

Quote:
or better yet create a new
virtualhost section for that site and put it in to one of the
include files that is run before the virtualhost sections.
But when I created an account, it appears in the end of file. Must I move the files of this new account manually by ssh? Is it?

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hostname in shared enviroment ASTRAPI cPanel Newbies 4 05-21-2009 08:46 PM
setup shared SSL the same as the hostname hicom cPanel and WHM Discussions 10 10-31-2008 09:06 AM
Problem with hostname keyboardkiller cPanel and WHM Discussions 1 01-10-2007 07:52 PM
Hostname problem. rXHosting cPanel and WHM Discussions 1 03-06-2006 12:42 AM
Help! Hostname problem! cooldude7273 cPanel and WHM Discussions 10 02-03-2005 04:18 AM


All times are GMT -5. The time now is 04:23 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc