[squid-users] Squid as reverse proxy for two or more webs

erdosain9 erdosain9 at gmail.com
Fri Aug 10 14:56:33 UTC 2018


Antony Stone wrote
>> I create two entries pointing to squid in DNS now.
>> site1.mydomain.lan
>> site2.mydomain.lan
> 
> So, both of those resolve to 192.168.1.21, right?
> 
> Yes, the resolve to the ip of squid.
> 
>> > The config example you want to follow is
>> > https://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers
> 
>> 
>> I read that... but i dont get what im doing wrong.
> 
> You want to follow the section:
> 
> Switching on Domains
> 
> Using cache_peer_access: 
> 
> cache_peer ip.of.server1 parent 80 0 no-query originserver name=server_1
> acl sites_server_1 dstdomain www.example.com example.com
> cache_peer_access server_1 allow sites_server_1
> 
>> this is the config now.
>> 
>> http_port 192.168.1.21:80 accel vhost
>> 
>> cache_peer 192.168.1.246 parent 80 0 proxy-only name=site1
>> cache_peer 192.168.1.223 parent 80 0 proxy-only name=site2
> 
> You are missing "originserver" at the very least.  Otherwise Squid expects
> to 
> find another proxy at the IP address.
> 
> Oh, sorry. I try with that config too. anyway i dont know about that.
> thanks.
> 
> ...when you requested what as a URL?
> site1.mydomain.lan
> 
>> 1533911112.071      1 192.168.6.20 TCP_MISS/500 4605 GET
>> http://site1.MYDOMAIN.lan/ - HIER_NONE/- text/html
> 
> Looks like you entered "site1.mydomain.lan" into your browser.
> 
> Yep.
> 
> Try "ticket.mydomain.lan" (after correcting the above config problems)
> instead.
> 
> Well, if if put ticket.mydomain.lan i go directly to the server i want to
> go.
> 
> This is:
> 
> ticket.mydomian.lan ----------------------------> Server  1
> php.mydomian.lan ------------------------------> Server 2
> 
> site1.mydomain.lan --------------------------------> squid
> site2.mydomian.lan --------------------------------> squid
> 
> for my config i expect that when squid receive site1 go to
> ticket.mydomain.lan
> and for site2 go to php.mydomain.lan
> 
> Thanks to all.





--
Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html


More information about the squid-users mailing list