technicalsys
asked on
Linux Server Squid configuration
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
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
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.
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
It will work. :)
cheers
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.
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
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
ASKER
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
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
Once try my above given suggestion as well.. it should work...
Run the following command
squid -z
and then
service squid start
or post your /var/log/squid/cache.log files
squid -z
and then
service squid start
or post your /var/log/squid/cache.log files
ASKER
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
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
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you tried the other steps as well to check connectivity from other hosts as well.
ASKER
Will check the with issue.