![]() |
Anyone have an httpd.conf example of 2 ips setup
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.
|
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. |
If you do 2 ips, do you have to remove all
<VirtualHost *:80> and change them to <VirtualHost Ipaddyhere:80> |
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 clear
|
hey whered u go.
|
Quote:
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. |
alright thanks :)
|
| All times are GMT -7. The time now is 01:27 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123