Monday, November 25, 2013

apache with security

Ubuntu Linux

#### installation
  • apt-get install apache2-mpm-itk
  • apt-get install acl
  • set acl in /etc/fstab

    e.g. LABEL=cloudimg-rootfs   /        ext4   defaults,acl    0 0
#### instructions for setting up new virtual host

useradd --home /vhdocs/your_web --shell /bin/false your_web
# default permissions
chown -R ubuntu.your_web your_web
chmod -R o-rwx your_web
chmod -R g+rx your_web
chmod -R g-w your_web
setfacl -R -d -m "g:developers:rwx" your_web
setfacl -R -d -m "g:your_web:r-x" your_web

# allow read/write/execute to developers
setfacl -R -m "g:developers:rwx" your_web

# allow write to certain directories
setfacl -R -m "g:your_web:rwx" writable_dir

# everytime after deployment
setfacl -R -m "g:developers:rwx" *

cd /vhdocs/ ; git init

Saturday, November 23, 2013

Tuesday, November 12, 2013

windows มีปัญหา network connection แบบงงสุดๆ

ถ้าหากท่านอยู่ดีๆพบปัญหาว่า Windows ของท่านอยู่ๆเชื่อมต่อ network ไม่ได้ เข้าไปดูค่า network setting ก็ดูปกติดี หรือ บางครั้ง connection ทั้งหมดก็หายไปเฉยๆ อย่าเพิ่งตกใจ ให้ลอง install windows update แล้ว restart เครื่องดูนะครับว่าหายไหม

เหตุเป็นเช่นนี้ ดูเหมือนว่า windows จะมีปัญหาตรง windows update แม้เราจะเลือกว่าให้ download มาแต่อย่าเพิ่ง install แต่จะมีบาง update ที่ทำให้ windows เกิดปัญหากับ network ได้หากไม่ install แล้ว restart ข้าพเจ้าพบปัญหานี้ทั้งใน windows server 2003, windows xp, windows 7 และ windows 8 ตะรึงตรึง