I'm trying to understand the basic concept of how to run two domains on my VPS. My present situation is that I have one domain running. I've recently purchased another domain name which I probably will run later on my VPS. I'm not a reseller but looking only to run two domains from my VPS.
So I'm reading everything I can find about doing this, which frankly confuses me more because all this DNS stuff has been the most confusing to me of all the stuff I've had to learn about running my own VPS. At this point I'm just trying to get the basic outline about how to accomplish this.
Since I have two IP addresses I assume I should use 1 IP for one website and the second for the 2nd website (IP-based hosting). Which starts me off with a question about the registrar. Presently I have my present website set up at the registrar's nameserver setup as:
ns1.mywebsite1.com pointing to xx.xxx.5.120
ns2.mywebsite1.com pointing to xx.xxx.6.120
I'm wondering if when I register my second website I should drop the second nameserver for the first website and setup my second website as
ns1.mywebsite2.com pointing to xx.xxx.6.120.
I have seen reference made to leaving the first website alone as is and adding second website nameserver setup as:
ns1.mywebsite2.com pointing to ns1.mywebsite1.com
ns2.mywebsite2.com pointing to ns2.mywebsite1.com
For my server setup my understanding is that I need to change my http.conf file to add something similar to:
Listen 80
<VirtualHost xx.xxx.5.120>
DocumentRoot /www/mywebsite1
ServerName www.mywebsite1.com
</VirtualHost>
<VirtualHost xx.xxx.6.120>
DocumentRoot /www/mywebsite2
ServerName www.mywebsite2.com
</VirtualHost>
But I'm also not clear whether its better to use this ip-based virtual host method or the name-based virtual host method.
And finally I assume you have to add a second DNS zone for the second domain?
Any information about the basic outline involved in accomplishing this would be appreciated. Thanks in advance.
So I'm reading everything I can find about doing this, which frankly confuses me more because all this DNS stuff has been the most confusing to me of all the stuff I've had to learn about running my own VPS. At this point I'm just trying to get the basic outline about how to accomplish this.
Since I have two IP addresses I assume I should use 1 IP for one website and the second for the 2nd website (IP-based hosting). Which starts me off with a question about the registrar. Presently I have my present website set up at the registrar's nameserver setup as:
ns1.mywebsite1.com pointing to xx.xxx.5.120
ns2.mywebsite1.com pointing to xx.xxx.6.120
I'm wondering if when I register my second website I should drop the second nameserver for the first website and setup my second website as
ns1.mywebsite2.com pointing to xx.xxx.6.120.
I have seen reference made to leaving the first website alone as is and adding second website nameserver setup as:
ns1.mywebsite2.com pointing to ns1.mywebsite1.com
ns2.mywebsite2.com pointing to ns2.mywebsite1.com
For my server setup my understanding is that I need to change my http.conf file to add something similar to:
Listen 80
<VirtualHost xx.xxx.5.120>
DocumentRoot /www/mywebsite1
ServerName www.mywebsite1.com
</VirtualHost>
<VirtualHost xx.xxx.6.120>
DocumentRoot /www/mywebsite2
ServerName www.mywebsite2.com
</VirtualHost>
But I'm also not clear whether its better to use this ip-based virtual host method or the name-based virtual host method.
And finally I assume you have to add a second DNS zone for the second domain?
Any information about the basic outline involved in accomplishing this would be appreciated. Thanks in advance.