Squid Problem


(Jun Padrigano) #1

Hi,


I'm running matrix, webserver and squid on the same box when I browsed the site it displays great but the only problem is that whenever I click on the list it redirects me on the same page. What seems to be wrong? is MySource Matrix not compatible with squid? is there any possible solution to this problem? I'm guessing that it's because of HTTP headers. Anyway waiting for a little help would do. Thank you and more power.





Regards



taffy


(Avi Miller) #2

What list are you clicking on? Matrix is very compatible with Squid (in fact, we have a whole Squid module in the SSV version that allows you to clear Squid's cache automatically from Matrix). I'm just not sure what list you're talking about and what page it is loading.

(Jun Padrigano) #3


http://netsquid.loggedongroup.com try accessing the site and click on any link. and it will reload the page.

(Avi Miller) #4

Matrix is delivering your home page as a 404 error, which indicates it is not getting the right URL/Host information from Squid. I noticed this by using Firebug in Firefox and looking at the response.

Can you post your squid.conf file so that we can see? You need to ensure that Squid is sending the correct host header to your Apache server, otherwise Matrix won't know what page to deliver. Check things like your Squid access.log and Apache access_log files to see what is actually being requested.

One of our sysadmins posted our usual http://netsquid.loggedongroup.com setup in another thread.

(Jun Padrigano) #5

[quote]Matrix is delivering your home page as a 404 error, which indicates it is not getting the right URL/Host information from Squid. I noticed this by using Firebug in Firefox and looking at the response.


Can you post your squid.conf file so that we can see? You need to ensure that Squid is sending the correct host header to your Apache server, otherwise Matrix won’t know what page to deliver. Check things like your Squid access.log and Apache access_log files to see what is actually being requested.



One of our sysadmins posted our usual squid.conf setup in another thread.[/quote]





http_port 80

cache_mem 2048 MB

cache_dir ufs /var/spool/squid 2048 16 256

hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?

auth_param basic children 5

auth_param basic realm Squid proxy-caching web server

auth_param basic credentialsttl 2 hours

auth_param basic casesensitive off

refresh_pattern ^ftp: 1440 20% 10080

refresh_pattern ^gopher: 1440 0% 1440

refresh_pattern . 0 20% 4320



#acl all src 192.168.1.20

acl all src 0.0.0.0/0.0.0.0

acl manager proto cache_object

acl localhost src 127.0.0.0/255.255.255.0

#acl to_localhost dst 127.0.0.1/32

acl to_localhost dst 192.168.1.20

acl SSL_ports port 443 563

acl Safe_ports port 80 # http

acl Safe_ports port 21 # ftp

acl Safe_ports port 443 563 # https, snews

acl Safe_ports port 70 # gopher

acl Safe_ports port 210 # wais

acl Safe_ports port 1025-65535 # unregistered ports

acl Safe_ports port 280 # http-mgmt

acl Safe_ports port 488 # gss-http

acl Safe_ports port 591 # filemaker

acl Safe_ports port 777 # multiling http

acl CONNECT method CONNECT



http_access allow to_localhost

http_access allow manager localhost

#http_access deny manager

#http_access deny !Safe_ports

#http_access deny CONNECT !SSL_ports

http_access allow localhost

#http_access deny all

http_access allow all



http_reply_access allow all

icp_access allow all

#httpd_accel_host virtual on

httpd_accel_host 192.168.1.20

httpd_accel_port 81

httpd_accel_uses_host_header on

httpd_accel_single_host on

httpd_accel_with_proxy on

coredump_dir /var/spool/squid





here it is


(Avi Miller) #6

Is the URL you're using (netsquid.loggedongroup.com) configured for the site in Matrix? If not, you will have to configure it so that Matrix knows which assets to serve for the requests it is receiving.

Also, I would recommend against using your home page as your 404 Page Not Found page, as this may be confusing for users (and testing!).

(Jun Padrigano) #7

[quote]Is the URL you're using (netsquid.loggedongroup.com) configured for the site in Matrix? If not, you will have to configure it so that Matrix knows which assets to serve for the requests it is receiving.


Also, I would recommend against using your home page as your 404 Page Not Found page, as this may be confusing for users (and testing!).[/quote]



i already edited but it seems that it has no effect though :frowning:


(Avi Miller) #8

Take a look at the Apache access_log file to see what URLs the Squid proxy is actually requesting. This should assist you in determining how to configure Matrix appropriately. Remember that in order for Matrix to send the correct page, the URL delivered to Matrix has to match the URL assigned to an asset.

(Jun Padrigano) #9


Hi,

I read this :

The simplest way to configure Squid on the same machine as Apache with Matrix, is to have them both listening on port 80:

Bind Apache to 127.0.0.1:80
Bind Squiz to 1.2.3.4:80 (where 1.2.3.4 is the Real IP)

Then change:

CODE
httpd_accel_host 127.0.0.1
httpd_accel_port 80

Bind Squiz to 1.2.3.4:80 (where 1.2.3.4 is the Real IP) -- means to say that i have to configure my squiz.conf as well? I would be willing to try if this would be the simplest way for it to work. Thank you in advance

(Avi Miller) #10

That should be: Bind [b]Squid[/b], not Squiz. I posted a link to our default Squid configuration file earlier in the thread. You should use that as a starting point for configuring your own Squid configuration. If you are still having difficulties, I suggest contacting Squiz Support for assistance.