Jump to content


Photo

[HELP] The Squid configuration

squid config apache

Best Answer TFT2012, 20 September 2013 - 10:53 AM

Finally I figured it out. It was quite simple.

 

Ignore the settings above, I wrote the following one. The Squid ver is 3.3.9

acl Safe_ports port 9000-9009 #My testing ports

http_port 9000 accel defaultsite=mywebsitename
cache_peer "the IP of mywebsite" parent "the actual port mywebsite uses" 0

# I assigned 9000 to Squid 
# I changed the actual website port from 9000 to 9001.
Go to the full post


  • Please log in to reply
1 reply to this topic

#1 TFT2012

TFT2012

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts
  • LocationSouthern California

Posted 18 September 2013 - 06:44 PM

I have a HTTP server setup on port 9000.

I want to setup a squid proxy server lies before it.

After I installed the squid, I just did two changes:

acl Safe_ports port 9000    # http

acl ppnetwork src 192.168.0.0/24
http_access allow ppnetwork

Then, I

squid -k parse
squid

The squid is running. I can see the log from cache.log

2013/09/18 16:25:44 kid1| Store logging disabled
2013/09/18 16:25:44 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2013/09/18 16:25:44 kid1| Target number of buckets: 1008
2013/09/18 16:25:44 kid1| Using 8192 Store buckets
2013/09/18 16:25:44 kid1| Max Mem  size: 262144 KB
2013/09/18 16:25:44 kid1| Max Swap size: 0 KB
2013/09/18 16:25:44 kid1| Using Least Load store dir selection
2013/09/18 16:25:44 kid1| Set Current Directory to /home/xxxxx/squid/var/cache/squid
2013/09/18 16:25:44 kid1| Loaded Icons.
2013/09/18 16:25:44 kid1| HTCP Disabled.
2013/09/18 16:25:44 kid1| Squid plugin modules loaded: 0
2013/09/18 16:25:44 kid1| Accepting HTTP Socket connections at local=0.0.0.0:3128 remote=[::] FD 9 flags=9
2013/09/18 16:25:45 kid1| storeLateRelease: released 0 objects

But, if I access the http site like http://mysite:9000, should I supposed to see any contents in the squid access.log? If so, why is my access.log empty?

Do I setup the proxy server correctly?

 

Thanks!


Edited by TFT2012, 18 September 2013 - 06:46 PM.


#2 TFT2012

TFT2012

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts
  • LocationSouthern California

Posted 20 September 2013 - 10:53 AM   Best Answer

Finally I figured it out. It was quite simple.

 

Ignore the settings above, I wrote the following one. The Squid ver is 3.3.9

acl Safe_ports port 9000-9009 #My testing ports

http_port 9000 accel defaultsite=mywebsitename
cache_peer "the IP of mywebsite" parent "the actual port mywebsite uses" 0

# I assigned 9000 to Squid 
# I changed the actual website port from 9000 to 9001.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com