Solved

Linux Server Squid configuration

Posted on 2011-02-14
12
539 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reaching outside NTP servers from within a domain? 12 96
linux $PWD 2 596
Linux alternative boot CD? 28 102
php54-php-imap for redhat enterprise linux 7.2 1 76
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
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…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

20 Experts available now in Live!

Get 1:1 Help Now