About 2 or more IP address

goody

Verified User
Joined
Jan 13, 2009
Messages
7
hello~

My server has three different IP address(for example there are A,B,C)
and I fill in DA the other two IP addresses.
I create a user by DA,and I set a domain's A record to A ,B , C the 3 ip address.
But only one which I set to A can be Visited,the other two only be visited the default page of Apache.

How can I do,the other two domain record can be visited Correctly?

Thanks
Best Regards
goody zeng
 
Last edited:
The first thing you have to do after adding ip addresses is assign them to a reseller even if its only the admin reseller.

Then you can assign those ip addresses to users and in turn the domains under that user will use that ip address.
 
Floyd, I think your response is incomplete because I think that Goody wants the same domain to run on all three IP#s.

Goody, DirectAdmin doesn't manage one domain with three IP#s. I don't know where you filled in the other two IP addresses, but I do know you didn't use the control panel to assign them to the same user, and then to the same domain, because as Floyd points out, DirectAdmin doesn't let you do that.

I'm not sure what you expect to gain from having three IP#s on the same server point to the same domain, but you can do it manually if you want to. What you have to do is manually change the DNS (I believe you've already done that) and then manually change the user-level httpd.conf file to have complete sections for each IP#, all pointing to the same domain and the same webroot.

You'll have to chattr as immutable the user-level httpd.conf file to keep DirectAdmin from changing it later. You cannot make this change through the control panel.

You can find the user-level httpd.conf file at:

/usr/local/directadmin/data/users/USERNAME/httpd.conf

replacing USERNAME with the actual username.

Jeff
 
Floyd, I think your response is incomplete because I think that Goody wants the same domain to run on all three IP#s.

Goody, DirectAdmin doesn't manage one domain with three IP#s. I don't know where you filled in the other two IP addresses, but I do know you didn't use the control panel to assign them to the same user, and then to the same domain, because as Floyd points out, DirectAdmin doesn't let you do that.

I'm not sure what you expect to gain from having three IP#s on the same server point to the same domain, but you can do it manually if you want to. What you have to do is manually change the DNS (I believe you've already done that) and then manually change the user-level httpd.conf file to have complete sections for each IP#, all pointing to the same domain and the same webroot.

You'll have to chattr as immutable the user-level httpd.conf file to keep DirectAdmin from changing it later. You cannot make this change through the control panel.

You can find the user-level httpd.conf file at:

/usr/local/directadmin/data/users/USERNAME/httpd.conf

replacing USERNAME with the actual username.

Jeff

Sorry,I did not make my words clear!
For example like this
I use <A.abc.com> pointing to A ip address
use <B.abc.com> pointing to B ip address
use <C.abc.com> pointing to C ip address

then <A.abc.com> <B.abc.com> and <C.abc.com>were tied to the same site in DA control panel.
But only <A.abc.com> can be visited correctly,the others are turn to the default page of apache.

To modify the user-level httpd.conf file can solve this problem
and noting to do in DA control panel?

Would you tell me where should I modify in this file?

Thank you very very .....much.
Regards
Goody zeng
 
goody said:
To modify the user-level httpd.conf file can solve this problem
and noting to do in DA control panel?

Would you tell me where should I modify in this file?

Already answered.

jlasman said:
You can find the user-level httpd.conf file at:

/usr/local/directadmin/data/users/USERNAME/httpd.conf

replacing USERNAME with the actual username.
 
Already answered.

I mean how to modify the file.
The content of the file is following


# Auto generated apache config file by DirectAdmin version 1.33.0
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to his/her website

# Frontpage requires these parameters in every httpd.conf file or else
# it won't work.
ServerRoot /etc/httpd



<VirtualHost 222.49.117.57:80>


ServerName www.woody.c.128zd.cn
ServerAlias www.woody.c.128zd.cn woody.c.128zd.cn a.c.128zd.cn www.a.c.128zd.cn
ServerAdmin [email protected]
DocumentRoot /home/woody/domains/woody.c.128zd.cn/public_html


UseCanonicalName OFF

SuexecUserGroup woody woody
CustomLog /var/log/httpd/domains/woody.c.128zd.cn.bytes bytes
CustomLog /var/log/httpd/domains/woody.c.128zd.cn.log combined
ErrorLog /var/log/httpd/domains/woody.c.128zd.cn.error.log

<Directory /home/woody/domains/woody.c.128zd.cn/public_html>
Options +Includes -Indexes

php_admin_flag engine ON
<IfModule !mod_php6.c>
php_admin_flag safe_mode OFF
</IfModule>
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email protected]'


php_admin_value open_basedir /home/woody/:/tmp:/usr/local/lib/php/


</Directory>



</VirtualHost>






I am freshman :(:(
 
Last edited:
I mean how to modify the file.

Also answered for the most part;

jlasman said:
and then manually change the user-level httpd.conf file to have complete sections for each IP#, all pointing to the same domain and the same webroot.


You have to completely add virtualhost sections for each ip address.

More importantly why do you want to do this?

use <A.abc.com> pointing to A ip address
use <B.abc.com> pointing to B ip address
use <C.abc.com> pointing to C ip address

It also looks like you want subdomains a.abc.com and b.abc.com and c.abc.com.

So you want three subdomains on three different ip addresses. Is that correct?

If that is correct then it is much more manageable to create three users each having one of the three ip addresses and then add the subdomains as regular domains.

I think we had come to understand that you wanted one domain to have three ip addresses. But I am not sure what you want now.
 
Back
Top