บทความ

กำลังแสดงโพสต์จาก 2012

แก้ปัญหา Directory Index เป็นภาษาต่างดาว

รูปภาพ
เวลาเรียกดูไดเรคทอรี่งานที่เราเก็บไว้ ตามลิงค์ที่เราทำ แล้วมันเป็นภาษาต่างดาว เราจะแก้ไขดังนี้ เข้าไปแก้ไขไฟล์ httpd.conf # vim /etc/httpd/conf/httpd.conf # First, we configure the "default" to be a very restrictive set of # features. # <Directory   / >     Options FollowSymLinks     AllowOverride None # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # <Directory   "/var/www/html" > # # Possible values for the Options directive are "None", "All", # or any combination of: #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. #

เปลี่ยนชื่อเครื่อง Linux Mint

เปิด terminal ขึ้นมา พิมพ์คำสั่ง $ sudo nano /etc/hostname pw99ke แก้ไขเสร็จ Save Ctrl+X จากนั้น restart เครื่องครับ $ sudo reboot -------------- ถ้าบางทีมันขึ้น sudo: unable to resolve host pw99ke ให้แก้ไขไฟล์ hosts $ sudo nano /etc/hosts 127.0.1.1 localhost 127.0.1.1 pw99ke

วิธีตั้ง crontab ใน Ubuntu

หามาตั้งนาน วิธีตั้ง crontab ให้ sync เวลาจาก T ime S erver มาให้กับ web apps server ต้องขอขอบคุณคุณผดุงศิลป์ JI $ sudo nano /etc/crontab # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user  command 1 * * * * root ntpdate 192.168.xx.xx  //เพิ่มใหม่เข้ามา IP เป็นของ Time Server นะครับ 17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-pa

eth0 ไม่ทำงาน

หลังจาก ghost Ubuntu Web Server แล้ว ปัญหาหนึ่งที่เจอคือ network ไม่ยอมรีสตาร์ท วิธีที่ใช้เดิมจะต้องไปเปลี่ยน eth0 เป็น eth1 ใน $ sudo nano /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.xx.xxx netmask 255.255.255.0 gateway 192.168.xx.xxx --> เปลี่ยนเป็น auto eth1 iface eth1 inet static แต่ตอนนี้ไม่ต้องแล้ว ใช้วิธีดังนี้ ให้ลบหรือเปลี่ยนชื่อเพื่อแบ็คอัพไฟล์ /etc/udev/rules.d/70-persistent-net.rules ก่อน $ sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.org จากนั้นรีบู๊ต $ sudo reboot น่าจะใช้ได้เป็นปกติ ลิงค์ที่น่าสนใจ http://ubuntuforums.org/showthread.php?t=1540959 https://help.ubuntu.com/community/VirtualBox/Networking http://mylinuxramblings.wordpress.com/2010/06/03/installing-virtualbox-guest-additions-on-ubuntu-server-10-04/ http://blog.brettalton.com/2010/04/28/installing-guest-additio