How to get multiple domains, with different IPs, to point to the same DocumentRoot?
I have Linux dedicated server with its own nameserver. What I want to do is to point a group of domains I have registered (and pointed to my nameserver) to the same DocumentRoote.g. /home/example/public_html.How can I do this using httpd.conf? I dont want to use the cPanel add-on domain feature, because I dont want to user sub-directories, and because I want to do this with a large number of domains and be able to change their IPs easily.
I've tried placing various permutations of the following entry into httpd.conf (including with only the ServerAlias, ServerName, and DocumentRoot directives), but it hasn't worked so far:
NameVirtualHost 200.50.100.10
<VirtualHost 200.50.100.10>
ServerAlias www.somesite.com somesite.com
ServerName www.somesite.com
DocumentRoot /home/example/public_html
ServerAdmin webmaster@example.com
BytesLog domlogs/example.com-bytes_log
User example
Group example
CustomLog domlogs/example.com combined
ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/
</VirtualHost>
After placing this type of entry into httpd.conf, trying to access the IP specified goes to the cPanel domain not configured page, and trying to access the domain gives a site not found.
When I add a domain onto an account with cPanel, what steps does it take? Other than editing httpd.conf, is there anything else I have to do?