LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-18-2009, 01:12 PM   #1
dellthinker
Member
 
Registered: Jan 2007
Distribution: Debian
Posts: 220

Rep: Reputation: 30
Problems with squid


Hi all. Im building a server that has a DansGuardian filter for my job and need help with the configuration.

I followed the instructions from this site and i've been getting errors when trying to restart squid.

These are the errors:

Code:
 squid2009/08/18 13:04:33| parseConfigFile: squid.conf:2 unrecognized: 'http_accel_host'
2009/08/18 13:04:33| parseConfigFile: squid.conf:3 unrecognized: 'http_accel_port'
2009/08/18 13:04:33| parseConfigFile: squid.conf:4 unrecognized: 'http_accel_with_proxy'
2009/08/18 13:04:33| parseConfigFile: squid.conf:5 unrecognized: 'http_accel_uses_host_header'
.
I dont understand, I followed the instructions as best i could and im getting errors with the conf file. Any suggestions? Thanx in advance!
 
Old 08-18-2009, 03:07 PM   #2
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Every one of those error messages seem to be saying 'when you set this parameter, there is something I don't like about it'.

There is little chance that anyone else who can't see the appropriate lines from you squid.conf will succeed in guessing what you have for those lines. You might also have need to explain a few things about your network, but will certainly need to say something about what you have set for those parameters, so just cust and paste the lines for people to look at.
 
Old 08-18-2009, 03:25 PM   #3
dellthinker
Member
 
Registered: Jan 2007
Distribution: Debian
Posts: 220

Original Poster
Rep: Reputation: 30
Ok so as i said before im making a filter for the network to weed out certain sites. The conf file i have is pretty much default with default settings. I dont see the need in pasting the entire conf as im sure the mods here wouldnt like that so i'll paste the changes that i have made.

Code:
http_port 127.0.0.1:3128
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
cache_effective_user squid
cache_effective_group squid
These are the changes that i read in the tutorial at the site i provided in my earlier post. The machine im running squid on is apart of a LAN that has 14 other computers connected to it via Eth/Wifi. Other than that its pretty straight forward. If anyone needs me to provide any other info to help me solve this problem just ask.

P.S. Should i use the machines DHCP assigned IP Address or the default 127.0.0.1 IP?

Thanx in advance!
 
Old 08-19-2009, 05:08 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by dellthinker View Post
Code:
http_port 127.0.0.1:3128
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
cache_effective_user squid
cache_effective_group squid
These are the changes that i read in the tutorial at the site i provided in my earlier post. The machine im running squid on is apart of a LAN that has 14 other computers connected to it via Eth/Wifi. Other than that its pretty straight forward. If anyone needs me to provide any other info to help me solve this problem just ask.

P.S. Should i use the machines DHCP assigned IP Address or the default 127.0.0.1 IP?

Thanx in advance!
If you want people to read it, include a link. Otherwise, it doesn't exist (for me). And even then, I might not read it.

Code:
http_port 127.0.0.1:3128
# TAG: http_port
# Usage: port [options]
# hostname:port [options]
# 1.2.3.4:port [options]
#
# The socket addresses where Squid will listen for HTTP client
# requests. You may specify multiple socket addresses.
# There are three forms: port alone, hostname with port, and
# IP address with port. If you specify a hostname or IP
# address, Squid binds the socket to that specific
# address. This replaces the old 'tcp_incoming_address'
# option. Most likely, you do not need to bind to a specific
# address, so you can use the port number alone.
#
# If you are running Squid in accelerator mode, you
# probably want to listen on port 80 also, or instead.
#
# The -I command line option will override the *first* port
# specified here.
#
# You may specify multiple socket addresses on multiple lines.
...etc

I've always used the 'real' address of the machine (rather than the loopback address of 127.0.0.1, assuming that using the loopback address might end up with the packets traversing firewalls twice and that this might have an efficiency impact, but, I have ot admit, I'm not really that sure.

Code:
cache_effective_user squid
cache_effective_group squid
# TAG: cache_effective_user
# If you start Squid as root, it will change its effective/real
# UID/GID to the user specified below. The default is to change
# to UID to nobody. If you define cache_effective_user, but not
# cache_effective_group, Squid sets the GID to the effective
# user's default group ID (taken from the password file) and
# supplementary group list from the from groups membership of
# cache_effective_user.
#
#Default:
# cache_effective_user squid

seems reasonable, given that running services as root is a security problem waiting to happen (its still a potential security problem on a home network, just not one that you necessarily have to take seriously)...you might want to set up the squid account manually so that you know the password so that, if you need to debug, you can run squid manually

# TAG: cache_effective_group
# If you want Squid to run with a specific GID regardless of
# the group memberships of the effective user then set this
# to the group (or GID) you want Squid to run as. When set
# all other group privileges of the effective user is ignored
# and only this GID is effective. If Squid is not started as
# root the user starting Squid must be member of the specified
# group.
#
#Default:
# none

also seems reasonable

The others I can't currently comment on as this box only has 2.7 available to it and the config directives have changed between the 2.x series and the 3.x series. (So, you should say what your squid version is, because some of those directives clearly won't work on versions that don't recognise them.)
 
Old 08-19-2009, 05:21 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
Hello,

It looks to me that you're putting tags from squid 2.5 in a 3.x version. All references I have point back to 2.5 when in my current version 3.0STABLE16 they don't appear to be there any more, nor are they in the Squid 3.0 Configuration Manual.

As salasi pointed out, please post your version.

Kind regards,

Eric
 
Old 08-19-2009, 12:12 PM   #6
dellthinker
Member
 
Registered: Jan 2007
Distribution: Debian
Posts: 220

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by EricTRA View Post
As salasi pointed out, please post your version.
When i ran locate on the program i saw this:

Code:
squid_2.7.STABLE3-4.1_i386.deb
So im gonna assume that its 2.7 Stable 3. Also, if it will help any..i installed it using Debians package manager apt-get. Should i uninstall it and use the src version? Or can i work this out some other way.
 
Old 08-19-2009, 02:45 PM   #7
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Yes, after thinking about it again, I'm pretty sure that you are trying to use config parameter in a version which isn't configured to take it. At first I felt that given the differences between 2.x and 3.x that's what was going one, but I note that the tutorial that you are using is pretty old, so it may be an early 2.x and a late 2.x.

(Note that there are other possibilities, too; some of the config parameters are optional and if whoever built your version didn't build the particular parameter in, then that would cause it too. Their squid.conf should always comply with their build settings, though.)

So, if you do this right, there is no danger of getting into this trouble. You open the squid.conf that was installed with your squid and edit the settings according to the comments. A bit tedious, because squid.conf is quite long, but it works.

If yopu are confident that the tutorial gives you good info -and with a 2004 tutorial, I don't see how you can be that confident- using the search function in your text editor will get you straight to the bits that you want to edit. If you search and don't find, that is already telling you something.

Note that your install ought to have an unmolested .conf file under somewhere like /usr/share/squid/squid.conf.default; if the install has already done any config for you (say networking addresses), the .default version may not have it. OTOH, if you saved a version before you started editing, that would be even better.
 
Old 08-19-2009, 04:03 PM   #8
dellthinker
Member
 
Registered: Jan 2007
Distribution: Debian
Posts: 220

Original Poster
Rep: Reputation: 30
Alright then. I'll either try to get it working with the default config
(/usr/share/doc/squid/examples/squid.conf) And if it still doesnt work the way that i'm looking for i'll just scrap the entire prog and install from src.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQUID 2.6 Problems neothephoenix Linux - Enterprise 6 05-02-2008 09:46 AM
Squid problems billiejoex Linux - Software 1 01-13-2006 07:44 PM
problems with squid msound Linux - Networking 6 06-03-2005 02:06 PM
Squid problems ... Pirahna Linux - Networking 3 12-06-2004 11:32 AM
Squid Problems Osiris123d Linux - Software 3 08-25-2004 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration