Domain Aliases To Another IP. How?..

Dantist

Verified User
Joined
Jan 5, 2008
Messages
8
Hi! Have a Question.
Consider, that I have an php-engine of some big site. The ingine files in a home directory of user1, and with main domain is domain.com.
A lot of other domains, are aliases to domain.com, through "Domain Pointer" feature. The engine is getting HTTP_HOST from $_SERVER vars, and depending on it send to client appropriate content...

The problem is, that all these domains (the main, and aliases) is residing on one IP... I want to share them on range of IPs... How can I do it, without creating a new user (on next IP) and duplicating the whole php-engine on it?...

Thanks for an Answer!
Good Luck for Everyone! :))
 
The Domain Pointer will always use the same IP#.

This may work:

Create the sites on new IP#s using the DirectAdmin control panel.

Through the shell change the DocumentRroot in the site-specific httpd.conf file, found at /usr/local/directadmin/data/users/USERNAME/httpd.conf (where USERNAME should be replaced by the new domain's username).

Then use chattr (see man chattr for instructions) to set the file immutable so DirectAdmin will no longer be able to change it.

Note that this will work only for the website; each site will still have it's own email.

Jeff
 
Back
Top