Search squid archive

Re: replacing Apache httpd

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

 



On 06/04/11 22:26, Daniel Plappert wrote:
Hi Amos,

thank you very much for your help!
I removed the "forceddomain" option and it almost worked. My only problem now is using subdomains. I've 2 subdomains:

sub1.example.com
sub2.example.com

and I want to delegate them to different servers. The problem is, that squid does not recognize them. If I remove the defaultsite=example.com option, I get the following error:

The following error was encountered while trying to retrieve the URL: /
Invalid URL
Some aspect of the requested URL is incorrect.

That error only comes up if request destined to a web server or squid reverse-proxy port is received by a forward-proxy port.

For example a browser requesting http://example.com:3128/ instead of http://example.com/

(assuming your management port 3128 is publicly accessible same as the reverse-proxy port 80)

...

by calling sub1.example.com or sub2.example.com. If I add the defaultsite=example.com option, all subdomain calls will be delegated to example.com (because of the defaultsite option).

Assuming you have left "vhost" flag on the port 80 that is behaviour of a broken browser software. "defaultsite=" is only used if there is no indication of which domain the request is for (based on Host: header not URL).

Here is what I added in my conf-file:

cache_peer sub1 parent 80 0 no-query originserver name=sub1
acl sub1_domain dstdomain sub1.example.com
http_access allow sub1_domain
...

? "cache_peer_access sub1 allow sub1_domain"  ??
? "cache_peer_access sub1 deny all"           ??


Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.12
  Beta testers wanted for 3.2.0.6


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

  Powered by Linux