Solved

Linux Server Squid configuration

Posted on 2011-02-14
12
536 Views
Last Modified: 2012-05-11
HI,
I have a Windows Server 2003 and from here i install Redhat Linux on VmWare.
On the Linux server I configured Samba Server as a File Server. Here i want to configure Squid as Proxy Server.

But the issue when i want to start the service of Squid i gen an error: FATAL: Could not determine fully qualified hostname. Please set 'visible_hostname'is

 Here i want to set the host name on squid.conf file but the file is not editable. i can not edit this file nor copy or paste the file.

Please help.

Regards
0
Comment
Question by:technicalsys
  • 4
  • 4
  • 2
  • +2
12 Comments
 
LVL 23

Expert Comment

by:savone
ID: 34887605
You will need to be root to edit the squid.conf file.  There is no other reason I can think of as to why you wouldn't be able to edit the file.


0
 
LVL 12

Expert Comment

by:upanwar
ID: 34887731
Hostname which you have set for your squid proxy server is not resolvable so either change your squid server hostname to locaalhost.localdomain or make a DNS entry in your local dns server for the hostname and add DNS server IP in resolve.conf

It will work. :)

cheers
0
 
LVL 25

Expert Comment

by:madunix
ID: 34892583
Edit squid.conf, search visible_hostname in squid.conf and mention a hostname , the hostname should be your server name as well  in /etc/hosts file.
0
 
LVL 1

Expert Comment

by:aartha
ID: 34899176
Open a command window
type su
enter your password
type vi /etc/squid/squid.conf
type i
type visible_hostname host.domainname
press Esc key
type :wq
type service squid start

thats it
0
 

Author Comment

by:technicalsys
ID: 34913573
Hi,

I define the host name at etc/squid/squid.conf below the tag visible_hostname as 'Linux" which is my hostname.

But still i got the error when i want to start the service  " squid failed. The errror was: init_cache_dir /var/spool/squid.../
etc/init.d : line 162: 2017 Aborted
$SQUID -2-
F 2> /de/null

Starting squid: /etc/init.d/squid: line 162. 2018

Aborted $SQUID $ SQUID_OPTS 2> /dev/null

FAILED

Please suggest.

Thanks
0
 
LVL 12

Expert Comment

by:upanwar
ID: 34916282
Once try my above given suggestion as well.. it should work...
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:aartha
ID: 34917688
Run the following command

squid -z

and then

service squid start

or post your /var/log/squid/cache.log files
0
 

Author Comment

by:technicalsys
ID: 34923580
Hi,

Thanks for your help. I have added the hostname to squid.conf file and started the service.

But how can i test Squid is running or not. Basically this i testing from Linux 9.0 installed on Vmware. I have configured the Ip:192.1681.73 and SM 255.255.255.0 and no gateway. Primary DNS Server i have given as 127.0.0.1. I have configured the Proxy Settings on Mozia as Localhost and port 3128. but when i try to visit http://localhost:3128 it is giving error as "the requested URL  could not be retrived".

Please suggest, do i have to change any thing on the squid.conf file like IP address, or Network details or anything else. Attach my squid.conf file. How can i access this proxy server 192.168.1.73 from the Network.

Thanks in advance.

squid.txt
0
 
LVL 12

Expert Comment

by:upanwar
ID: 34924013
You can test via command.

service squid status (it will tell you the status of the service whether it is running or not)

or with Netstat command

netstat -natp | grep 3128

from client machine to check the connectivity, just open the command prompt and then type.

telnet <ip address> 3128

if you get escape charector in means you are able to access proxy box from client and squid is runing.

and to access the proxy server you need to configure the proxy setting on clients browser and then client would be able to access the sites via this proxy.
0
 

Accepted Solution

by:
technicalsys earned 0 total points
ID: 34932765
Hi upanwar,

When i run the command service squid status it is showing service is running.

Thanks
0
 
LVL 12

Expert Comment

by:upanwar
ID: 34932904
Have you tried the other steps as well to check connectivity from other hosts as well.
0
 

Author Closing Comment

by:technicalsys
ID: 35015628
Will check the with issue.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now