บทความอัพเดทในเว็บ ขออนุญาตอัพเดทช่องทาง https://fb.com/siamcafefan

ผู้เขียน หัวข้อ: ใคร ใช้ SquidNT ช่วยที่ครับ  (อ่าน 4330 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ lordmarina

  • นักเรียนประถม
  • ****
  • กระทู้: 59
  • Reputation: -1
ใคร ใช้ SquidNT ช่วยที่ครับ
« เมื่อ: สิงหาคม 14, 2008, 11:17:02 am »
พอดี ดูใน LOG มามันขึ้นแบบนี้อ่ะครับ
1135841393.421 127.0.0.1 http://rcweb.net/ http://mail.racingweb.net/cgi-bin/webmail.cgi?
1135841393.562 127.0.0.1 http://rcweb.net/ http://rcweb.net/css.css
1135841393.625 127.0.0.1 http://rcweb.net/ http://rcweb.net/css1.css
1135841393.671 127.0.0.1 http://rcweb.net/ http://rcweb.net/js/jssnow.js
1135841393.734 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/rw.gif
1135841393.781 127.0.0.1 http://rcweb.net/ http://ads.rcweb.net/adframe.php?
1135841393.781 127.0.0.1 http://rcweb.net/ http://ads.rcweb.net/adframe.php?
1135841393.781 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/s_l_1.gif
1135841393.796 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/hp_1.gif
1135841393.812 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/c_l_1.gif
1135841393.812 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/ar_0.gif
1135841393.828 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/c_0.gif
1135841393.828 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/cg_0.gif
1135841393.828 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/ac_0.gif
1135841393.828 127.0.0.1 http://rcweb.net/ http://rcweb.net/pic/cm_0.gif

เลข10หลักแรกมันคืออะไร หรอ ครับ แล้ว มัน บอก เวลาไหม ครับ อยากทราบ จะเอาไปเก็บ LOG File

 
Signature cleanned by Admin

ออฟไลน์ taxispace

  • นักเรียนประถม
  • ****
  • กระทู้: 54
  • Reputation: 0
Re: ใคร ใช้ SquidNT ช่วยที่ครับ
« ตอบกลับ #1 เมื่อ: สิงหาคม 14, 2008, 02:24:49 pm »
ใช้ SquidNT เวอร์ชั่นไหนครับ  ถ้าจะให้ดี ใช้เวอร์ชั่น 2.6 ครับของคุณบอม แล้วแก้ Logformat
ตามนี้ครับ   โดยทำการเพิ่ม

logformat common %{%Y-%m-%d %H:%M:%S}tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
cache_access_log
  /var/log/squid/access.log common

แทนที่

cache_access_log  /var/log/squid/access.log

ลงในไฟล์ /etc/squid/squid.conf

เสร็จแล้วทำการ Restart  squid ใหม่

เข้าไปดูใน logfile หน้าตาก็จะประมาณนี้

2008-08-10 10:03:18    104 192.168.108.13 TCP_MISS/200 335 GET http://patch.sf.in.th/version.ini - DIRECT/61.90.203.90 application/octet-stream
2008-08-10 10:03:18    602 192.168.108.19 TCP_MISS/200 5882 GET http://pagead2.googlesyndication.com/pagead/ads? - DIRECT/209.85.143.164 text/html
2008-08-10 10:03:18    123 192.168.108.19 TCP_HIT/200 1485 GET http://www.cmprice.com/images/icon.ico - DIRECT/202.151.178.64 image/x-icon
2008-08-10 10:03:21    112 192.168.108.18 TCP_REFRESH_HIT/304 265 GET http://widget-ad.slide.com/widgets/shim7.swf - DIRECT/60.254.131.86 application/x-shockwave-flash
2008-08-10 10:03:22     50 192.168.108.19 TCP_HIT/200 465 GET http://www.moohin.com/trips/lao/sabaidee/ - NONE/- text/html
2008-08-10 10:03:22    132 192.168.108.13 TCP_MISS/200 6019 GET http://nprotect.sf.in.th/nProtect/GameGuard/RealServer/update.cfg? - DIRECT/61.90.203.4 config
2008-08-10 10:03:22      9 192.168.108.19 TCP_HIT/200 1774 GET http://www.moohin.com/favicon.ico - NONE/- image/x-icon
2008-08-10 10:03:23     81 192.168.108.19 TCP_MISS/302 581 GET http://www.onlinemediathailand.com/url-work.php - DIRECT/61.47.7.228 text/html

ตรงสีแดง แก้ไขด้วยว่าคุณจะ Logfile ไว้ที่ไหน เช่น ของผมไดร์ D เพราะ Drive C ผมล๊อคไว้ ก็จะได้เป็น D:/squid/var/logs/access.log common

เครดิต : http://www.hadyaiinternet.com/index.php?topic=254.msg1033;topicseen#msg1033    ลองดู :-* :P

ถ้าเค้ามาตรวจ ???แล้วไม่มี มันจะเศร้า :(
Signature cleanned by Admin

takongman

  • บุคคลทั่วไป
Re: ใคร ใช้ SquidNT ช่วยที่ครับ
« ตอบกลับ #2 เมื่อ: สิงหาคม 14, 2008, 02:40:56 pm »
ของผมใช้ IPCOP ครับทำแล้วมันเข้าเว้บไม่ได้ครับ
ใช้ ipcop-1.4.18
   ipcop-advproxy-2.1.9
   ipcop-urlfilter-1.9.3
   copfilter-0.84beta3a

อันนี้เป็น Squid ของผมครับ ใกล้ถึงวันแล้วกลัวโดนจับจริงๆ :(

shutdown_lifetime 5 seconds
icp_port 0

http_port 192.168.10.1:8080 transparent
http_port 8080

hierarchy_stoplist cgi-bin ? .acgi .asp .cgi .css .chtml .htm .html .jhtml .js .jsp .perl .phtml .pl .php .php3 .php4 .shtml .xhtml .xml
acl QUERY urlpath_regex cgi-bin \? \.acgi \.asp \.cgi \.css \.chtml \.htm \.html \.jhtml \.js \.jsp \.perl \.phtml \.pl \.php \.php3 \.php4 \.shtml \.xhtml \.xml
cache deny QUERY

acl QUERYS urlpath_regex ProjectG.exe.zip
acl QUERYS urlpath_regex FantaTennis.exe
acl QUERYS urlpath_regex notice_popup
acl QUERYS urlpath_regex Court_Ad_0
acl QUERYS urlpath_regex Main_Ad
acl QUERYS urlpath_regex cgi-bin
cache deny QUERYS

cache_effective_user squid
cache_effective_group squid
umask 022

pid_filename /var/run/squid.pid

cache_mem 384 MB
cache_dir aufs /var/log/cache 25000 16 256

error_directory /usr/lib/squid/advproxy/errors.ipcop/English
cache_replacement_policy heap GDSF
memory_replacement_policy heap GDSF
mime_table /etc/squid/mime.conf

dns_nameservers 127.0.0.1
pid_filename /var/run/squid.pid

access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none

quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95

refresh_pattern -i .(zip|gz|xfs|exe|arj|npz|lha|lzh|rar|tgz|tar|rar|jar|nup|wz|Z)$ 525960 99% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(class|pdf|rtf|doc|wp|wp5|ps|prn)$ 525960 99% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(mov|avi|mpg|wav|au|mid|mp3)$ 525960 95% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(jpg|gif|jpeg|png|css|js)$ 525960 18000% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(bmp|tif|tiff|xbm)$ 525960 17000% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(swf)$ 525960 20000% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern ^ftp: 4320 20% 43200
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 1440 50% 14400

cache_swap_low 90
cache_swap_high 95


log_mime_hdrs off
forwarded_for off
via off

acl with_allowed_useragents browser (MSIE.*[)]$)

acl within_timeframe time MTWHFAS 00:00-24:00

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 563 # snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 8080 # Squids port (for icons)

acl IPCop_http  port 81
acl IPCop_https port 445
acl IPCop_ips              dst 192.168.10.1
acl IPCop_networks         src "/var/ipcop/proxy/advanced/acls/src_subnets.acl"
acl IPCop_green_network    src 192.168.10.0/255.255.255.0
acl CONNECT method CONNECT

http_access allow         localhost

http_access allow         IPCop_ips IPCop_networks IPCop_http
http_access allow CONNECT IPCop_ips IPCop_networks IPCop_https

http_access deny          !Safe_ports
http_access deny  CONNECT !SSL_ports

http_access allow IPCop_networks within_timeframe
http_access allow  all

header_access X-Forwarded-For deny all
header_access Via deny all

httpd_suppress_version_string on

maximum_object_size 512000 KB
minimum_object_size 0 KB

request_body_max_size 0 KB
reply_body_max_size 0 allow all

reload_into_ims on
logfile_rotate 1
ie_refresh on

visible_hostname ipcop.connect.com

url_rewrite_program /usr/sbin/squidGuard
url_rewrite_children 5

ftp_sanitycheck off

ออฟไลน์ shine2

  • ผ่านการทดสอบเลื่อนชั้น
  • **
  • กระทู้: 20
  • Reputation: -1
Re: ใคร ใช้ SquidNT ช่วยที่ครับ
« ตอบกลับ #3 เมื่อ: สิงหาคม 16, 2008, 10:32:59 am »
มันไม่เห็นได้เลยครับ
Signature cleanned by Admin

ออฟไลน์ skynet555

  • นักเรียนประถม
  • ****
  • กระทู้: 51
  • Reputation: 0
Re: ใคร ใช้ SquidNT ช่วยที่ครับ
« ตอบกลับ #4 เมื่อ: สิงหาคม 20, 2008, 07:28:39 am »
หามานาน ลองแล้ว แจ่มๆ ครับ  :-*
Signature cleanned by Admin

artcung

  • บุคคลทั่วไป
Re: ใคร ใช้ SquidNT ช่วยที่ครับ
« ตอบกลับ #5 เมื่อ: สิงหาคม 27, 2008, 06:00:34 pm »
ถามหน่อยครับ ว่าจะ set config ยังไง ให้ มันเก็บ access log แยกเป็น วันๆได้ ครับ
เช่น 25082551access.txt  26082551access.txt ... ประมานนี้ครับ