[colug-432] virtual hosts based on ip

Roberto C. Sánchez roberto at connexer.com
Wed Oct 14 09:51:34 EDT 2015


On Wed, Oct 14, 2015 at 09:11:36AM -0400, Keith Larson wrote:
>    is it possible to present a different instance of a page based on the
>    source ip address?  ie.  two customers A and B.  i want customer A to see
>    a different version of a webpage than customer B.  they have different ip
>    ranges that they would be coming from based on their external nat.  i
>    would think that this can be done, but i'm not exactly sure how.  i've
>    done named virtual hosts with no problems.
>     
>    i also don't want customer A to be able to see customer B's version or
>    even know that it exists.
>     

I wouldn't do this in Apache.  I would run two different instances of
Apache on two different ports and then use iptables to redirect based on
the source IP.  You can do this in Shorewall with a simple REDIRECT
rule.

Regards,

-Roberto

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://lists.colug.net/pipermail/colug-432/attachments/20151014/0b513c1c/attachment.bin 


More information about the colug-432 mailing list