เราสามารถทำการบันทึก Client IP ทีเครื่อง backend แทนที่จะให้ปรากฎเป็น IP ของ varnish เช่น 127.0.0.1 สามารถทำได้โดยการ แก้ไขไฟล์ /etc/varnish/default.vcl
sub vcl_recv { # Add a unique header containing the client address remove req.http.X-Forwarded-For; set req.http.X-Forwarded-For = client.ip; # [...] }
และเพิ่มบรรทัดต่อไปนี้ในไฟล์ /etc/httpd/conf/httpd.conf
LogFormat “%{X-Forwarded-For}i %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i”" varnishcombined
และใน VirtualHost directive ให้ใช้ CustomLog ดังตัวอย่างต่อไปนี้
<VirtualHost [...]
ผมติดตั้ง CentOS linux 5.5 ใน parallels virtual machine แล้วหาทางส่งไฟล์ระหว่างกัน วิธีการหนึ่งที่สามารถทำได้คือผ่าน samba ซึ่งมีขั้นตอนดังนี้ครับ
ติดตั้ง samba ใน linux ด้วยคำสั่ง
#yum install samba แก้ไขไฟล์ /etc/samba/smb.conf ให้มีเนื้อหาในส่วนของ [homes] เป็น [homes] comment = Home Directories browseable = yes writeable = yes read only = yes สั่งให้ samba ทำงานด้วยคำสั่ง
#/etc/init.d/smb start กำหนด password ให้ user โดย user นั้นจะต้องมีจริงในระบบ (local [...]
Tags
.htaccess Apache blogspot CentOS codeigniter CSS domain name driver Drupal Flickr Hotmail HTML internet law linux mailing list mailman MICT mod_rewrite monitor MSL MySQL name server Network open source PHP Postfix Security Smarty sony Spammail SPF theme TLS traffic log Universiade UTF-8 UTF8 vbulletin Wordpress การเมือง จตุคาม รูปภาพ สถิติ เรารักในหลวง
