Mortgages - Wii Store - Mortgage Calculator - Credit Cards UK - Halloween Costumes

PDA

View Full Version : vhost config with multiple ips?


carolina-advertising
Feb 16th 2008, 2:44 pm
Hello guys,
I'm pulling my hair out here.
I've never had over 1 ip to use over the years. Now I have colo-ed and have 13 ip addresses. I'm not doing something right in apache. I'm getting the wrong site for a differentt ip etc.

Here is my order of includes...


Listen xxx.xxx.xxx.xxx:80
Listen yyy.yyy.yyy.yyy:80

NameVirtualHost xxx.xxx.xxx.xxx:80
NameVirtualHost yyy.yyy.yyy.yyy:80


<vhost1 xxx.xxx.xxx.xxx:80>
servername name.com

<vhost2 yyy.yyy.yyy.yyy:80>
servername name.com

<vhost3 yyy.yyy.yyy.yyy:80>
servername name.com

<vhost4 yyy.yyy.yyy.yyy:80>
servername name.com


My thinking is run as many one ip as shared
and assign certain ips to other domains that needs SSL


**EDIT
I need to run around 20 on a shared ip and 2 others on dedicated...
Can someone point me in the right direction for this setup?


any suggestions on what i'm doing wrong?
Thanks,
~RD

marksailes
Feb 17th 2008, 8:27 am
every ssl site will need its on ip,

but you can have many servernames per ip

so xxx.xxx.xxx.xxx

can be

mysite.com
yoursite.com
oursite.com

etc

each with a different or same location

Host.co.in
Feb 17th 2008, 2:29 pm
Hello,

You can assigned 1 IP to many domains as in case of shared servers. You can have many IP's pointing to one website. You can assign dedicated IP to every domain you have with you.
Thats correct the domain for which you need setup Private SSL, will definitely need an separate IP.

Please contact me in case you have any more questions.

Thank you.

RectangleMan
Feb 21st 2008, 2:55 am
Does your card recognize the IPs as assigned? Do an ifconfig. You may need to alias the extra IPs via the /etc/rc.conf

zacharooni
Feb 21st 2008, 3:00 am
Try doing this:

NameVirtualHost 1.1.1.1

<VirtualHost site-on-1.1.1.1.com:80>
<VirtualHost site2-on-1.1.1.1.com:80>

NameVirtualHost 1.1.1.2

<VirtualHost site-on-1.1.1.2.com:80>
<VirtualHost site2-on-1.1.1.2.com:80>

Ladadadada
Feb 22nd 2008, 2:39 am
Try checking your Apache error log just after a restart. It sometimes spits out errors there that it doesn't spit out in an apache configtest.

Also, I am assuming that each of your
servername name.com
lines is actually different.

i.e
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName name1.com
</VirtualHost>
<VirtualHost yyy.yyy.yyy.yyy:80>
ServerName name2.com
</VirtualHost>
<VirtualHost yyy.yyy.yyy.yyy:80>
ServerName name3.com
</VirtualHost>
<VirtualHost yyy.yyy.yyy.yyy:80>
ServerName name4.com
</VirtualHost>

If all of this is correct, make sure that name2.com, name3.com and name4.com actually resolve to yyy.yyy.yyy.yyy and not xxx.xxx.xxx.xxx and that name1.com resolves to xxx.xxx.xxx.xxx and not yyy.yyy.yyy.yyy.