I am having trouble setting up 2 ips to 2 seperate sites on the same server. Anyone have an example of setting up 2 ips to two different sites in the httpd.conf file? I followed the apache config but I must have screwed up somewhere.
Anyone have an httpd.conf example of 2 ips setup
Collapse
X
-
Anyone have an httpd.conf example of 2 ips setup
Tags: None -
NameVirtualHost ip1.ip1.ip1.ip1
NameVirtualHost ip2.ip2.ip2.ip2
<Virtualhost ip1.ip1.ip1.ip1>
ServerName site.com
ServerAlias www.site.com
DocumentRoot /home/user/domain.com
</VirtualHost>
<Virtualhost ip2.ip2.ip2.ip2>
ServerName site2.com
ServerAlias www.site2.com
DocumentRoot /home/user/domain2.com
</VirtualHost>
Technically the namevirtualhost stuff on top is only if you're going to host more than 1 virtual host / IP and in this case you're not but its there just to be safe.Managed US/NL Hosting [ [Reality Check Network ]
Dell XEON Servers + 1/2/3 TB Packages ICQ: 4-930-562 -
If you do 2 ips, do you have to remove all
<VirtualHost *:80> and change them to <VirtualHost Ipaddyhere:80>Comment
-
Sorry, actually I do host more than 1 site on an ip on the first IP, then just 1 on the second. My fault, i didnt make that clearComment
-
-
Yes you do. What Zagi said is correct.Originally posted by BoNgHiTtAIf you do 2 ips, do you have to remove all
<VirtualHost *:80> and change them to <VirtualHost Ipaddyhere:80>
NameVirtualHost ip1.ip1.ip1.ip1
NameVirtualHost ip2.ip2.ip2.ip2
And then with virtualhost you specify the ip that is used for the specific domain.Comment
-

Comment