Results 1 to 2 of 2
I am hosting multiple sites on my server, and I was able to setup a IP-based virtual host successfully. However I want each site to talk from the same ip ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-22-2012 #1
- Join Date
- May 2006
Apache to talk on multiple IP Addresses
So if a request comes in to site a, on ip xxx.xxx.0.2 and the servers ip is xxx.xxx.0.1, i want site a to reply from the xxx.xxx.0.2 ip and not xxx.xxx.0.1 as it currently is doing.
Currently I have 5 different IP addresses and domain names set up on one NIC. So when I do /sbin/ip addr I see 5 different addresses on eth0.
- 04-06-2012 #2
- Join Date
- May 2011
- Central FL
musya, Could you please be more specific about your configuration?
Here's what I'm guessing your setup is like:
domainX.tld -> DNS 127.0.0.1
domainY.tld -> DNS 127.0.0.2
domainZ.tld -> DNS 127.0.0.3
Apache: Listen *:80
However, if someone goes to domainX.tld, their DNS would direct them to 127.0.0.1; then, your virtualhost setting would point them to the entry for domainX.tld - which content they would then be served. This would be true for each domain.
- Are my presumptions about your setup correct?
- If not, what is different?
- What behaviour are you getting that is not what you were expecting?
- What do you want/expect?
Also, just to verify: Is there a specific reason (ssl, etc) that you're not using the more-popular name-based virtual hosting?