Using shared and dedicated ips for different domains.
Hi all,I have a problem.
I have 10 ip addresses, and One is a shared ip (main shared ip) and 2 others are nameservers.
That leaves me with 7 free ips that I binded to my server.
I am trying to give 5 domains ONE ip address for those 5 domains to share, but go to different paths (different folders/websites).
I gave domain 1 a dedicated ip, and it worked flawlessly, I ping it and it instantly shows up under the new ip address.
Now, I tried in cpanel to give domain 2 the same ip, but cpanel drop down menu, that ip address no longer shows up, I guess since cpanel see's it as being used now.
I logged into ssh, and edited /etc/named/domain2.com.db and COPIED the ip address of domain1.com.db. I saved that, didn't edit ANYTHING else in that file, and opened /usr/local/apache/local/httpd.conf and scrolled down to domain2 's entry, and made it <Virtualhost 00.000.000.001> for example the EXACT same as for domain 1 's ip.
I rebooted apache and bind, and now all of a sudden I check out that site domain2, and it's loading domain1.com's files.
I do NOT know for sure if this just happened now or if it was already going there, I just restored a backup for both sites just days ago and didn't test this domain except that it was online, but now I notice it's loading domain1's files.
I changed ip back to main shared ip in the .db and httpd.conf file, but the domain2 still loads domain1's files.
How do I fix this?
I tried again, with domain3, this time I used cpanel's "change site ip address" and used a fresh ip address, it didn't work this time, now it shows domain3 "cpanel default" no site exists at this web page. I changed ip back to shared ip in cpanel and it's back to normal and loads the website again.
I don't want to experiment anymore without knowing what I am doing.
How do I fix domain2 loading domain1's files and then how to do I give all 5 of these domains the same ip address (or even different ip addresses, that doesn't work either).
Thanks.
Mouse
Domain2's httpd entry shows:
<VirtualHost IPADDRESSOFMAINSERVER>
DocumentRoot /home/DOMAIN2USERNAME/public_html
BytesLog domlogs/DOMAIN2USERNAME.com-bytes_log
ServerName www.DOMAIN2USERNAME.com
User DOMAIN2USERNAME
Group DOMAIN2USERNAME
CustomLog domlogs/DOMAIN2USERNAME.com combined
ScriptAlias /cgi-bin/ /home/DOMAIN2USERNAME/public_html/cgi-bin/
</VirtualHost>
Note, the above paste was edited a little, removed the serveralias line as well.
DOMAIN2USERNAME replaced my real domain 2 username
Any help would be very much appreciated. I think maybe this didn't have anything to do with changing ip's, maybe when I restored the backup's it is loading both domains from domain1's files.