GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Anyone have an httpd.conf example of 2 ips setup (https://gfy.com/showthread.php?t=520383)

BoNgHiTtA 09-24-2005 11:02 PM

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.

zagi 09-24-2005 11:09 PM

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.

BoNgHiTtA 09-24-2005 11:13 PM

If you do 2 ips, do you have to remove all
<VirtualHost *:80> and change them to <VirtualHost Ipaddyhere:80>

BoNgHiTtA 09-24-2005 11:14 PM

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

BoNgHiTtA 09-24-2005 11:28 PM

hey whered u go.

adultguus 09-24-2005 11:42 PM

Quote:

Originally Posted by BoNgHiTtA
If you do 2 ips, do you have to remove all
<VirtualHost *:80> and change them to <VirtualHost Ipaddyhere:80>

Yes you do. What Zagi said is correct.

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.

BoNgHiTtA 09-25-2005 12:21 AM

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