Search squid archive

Re: An IP with multiple domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chyi wrote:
How do I setup squid to point to an IP which have multiple domains?

The scenario as follows:

1. www3.mainsite.com proxied to www.mainsite.com hosted on a dedicated
ip. (success)
2. www3.newsite.com proxied to www.newsite.com which hosted on a
shared ip. (failed)

I really suggest getting away form that www3 subdomain thing. Squid is designed to work best when the domain can be passed through to the origin server without having to change things.

It is by far easier and less complex to maintain when the backend server knows exactly what its providing to the public.


3. All dns is externally managed at www.everydns.net

You are aware of their pending merger and the upcoming alterations?


How do i solve this? Am using acce vhost at the moment and very new to
linux and squid.

Thanks.
C


Setup the squid according to the 'virtual hosting' reverse proxy example here. http://wiki.squid-cache.org/ConfigExamples/Reverse/VirtualHosting

You need a cache_peer entry per backend server.

If one server handles multiple of the domains, just list them all together in the one dstdomain ACL used for that server.

If you can drop the www3 alternatives, the above alone is enough to get a strong system running for any website. Otherwise you are stuck with a complex setup, usually involving url-rewriters, which introduce all sorts of limits on what code the website authors can use.


Amos
--
Please be using
  Current Stable Squid 2.7.STABLE7 or 3.0.STABLE24
  Current Beta Squid 3.1.0.16

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux