因為
DokuWiki stores configuration and page data in files.
These files should never be accessible directly from the web.
簡單說就是data資料夾不能直接在網頁上存取 (應該吧!?)
然後參考這個頁面的設定方法
http://www.dokuwiki.org/security#web_access_security
我作法是:
編輯 /etc/httpd/conf/httpd.conf
最後加上這些東西
<LocationMatch "dokuwiki/(data|conf|bin|inc)/">
Order allow,deny
Deny from all
Satisfy All
</LocationMatch>
重新啟動apache就好了
--
原來的設定檔是寫LocationMatch "/(data|conf|bin|inc)/"
可是怕會影響到其他東西 又懶得一個一個測試
改成LocationMatch "dokuwiki/(data|conf|bin|inc)/"之後
結果一樣 XD
2011年5月24日 星期二
2011年5月22日 星期日
關閉selinux
編輯/etc/sysconfig/selinux
裡面有說要怎麼關閉
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
所以說
SELINUX=disabled
這樣就可以了 XD
----
也可以在開機選單 grub.conf 或 menu.lst 裡面
在kernel那排指令加上selinux=0
http://wiki.linux.org.hk/w/Enable_or_Disable_SELinux
--
應該要重開機吧 不是很確定 囧~
裡面有說要怎麼關閉
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
所以說
SELINUX=disabled
這樣就可以了 XD
----
也可以在開機選單 grub.conf 或 menu.lst 裡面
在kernel那排指令加上selinux=0
http://wiki.linux.org.hk/w/Enable_or_Disable_SELinux
--
應該要重開機吧 不是很確定 囧~
開機自動執行vmware的虛擬主機
這個是vmware server 2用的方法 (網頁介面那個)
過程懶得打了 就看下面這篇吧 XD
重點就是把原本放在"Manual Startup"的虛擬主機往上移
移到"Any Order"就好了
ref(圖文說明):
http://blog.xuite.net/jyoutw/xtech/33835717
過程懶得打了 就看下面這篇吧 XD
重點就是把原本放在"Manual Startup"的虛擬主機往上移
移到"Any Order"就好了
ref(圖文說明):
http://blog.xuite.net/jyoutw/xtech/33835717
2011年5月16日 星期一
2011年5月9日 星期一
android dev phone 1 升級到2.2
台灣買的HTC magic可以參考 http://cdroid-aboutandroid.blogspot.com
(強者我學弟寫的東西 XD)
至於從Google買的android dev phone 1
好像就不能用這個方法
(我也不知道為什麼 囧)
後來找到這篇
http://wiki.cyanogenmod.com/index.php?title=Full_Update_Guide_-_Android_Dev_Phone_1
基本上只要按照他的步驟就可以成功了
================以下是備份 XD====================
這邊只講CyanogenMod 6的部份 其他版本請參考原網頁
1. 抓Amon_Ra 1.7.0 for CyanogenMod 6: 這個
2. 按返回鍵開機 進入fastboot mode
(以下fastboot不會使用可以參考強者我學弟的網誌 他有懶人包可以抓)
fastboot flash recovery recovery-RA-dream-v1.x.x.img
fastboot reboot
3. 抓 radio 檔案 2.22.19.26i
存到SD卡的根目錄
4. 按home開機進入recovery mode
選Flash zip from sdcard. 按剛剛那個檔案 弄完之後重開機
5. 抓CyanogenMod 6 (6.1.0-DS) 檔案連結
還有Google app的檔案 (就是market那些) 檔案連結
把這兩個存到SD卡的根目錄
6. 按home開機進入recovery mode
先Wipe -> Wipe data/factory reset & Wipe Dalvik-cache
再選Flash zip from sdcard.
選完update-cm-6.1.0-DS-signed.zip之後
再選gapps-mdpi-tiny-20101020-signed.zip
這樣就刷完了 就變成CyanogenMod 6了 科科
--
只是預設桌布我不是很喜歡 囧
長按桌面就可以去選桌布 XD
(強者我學弟寫的東西 XD)
至於從Google買的android dev phone 1
好像就不能用這個方法
(我也不知道為什麼 囧)
後來找到這篇
http://wiki.cyanogenmod.com/index.php?title=Full_Update_Guide_-_Android_Dev_Phone_1
基本上只要按照他的步驟就可以成功了
================以下是備份 XD====================
這邊只講CyanogenMod 6的部份 其他版本請參考原網頁
1. 抓Amon_Ra 1.7.0 for CyanogenMod 6: 這個
2. 按返回鍵開機 進入fastboot mode
(以下fastboot不會使用可以參考強者我學弟的網誌 他有懶人包可以抓)
fastboot flash recovery recovery-RA-dream-v1.x.x.img
fastboot reboot
3. 抓 radio 檔案 2.22.19.26i
存到SD卡的根目錄
4. 按home開機進入recovery mode
選Flash zip from sdcard. 按剛剛那個檔案 弄完之後重開機
5. 抓CyanogenMod 6 (6.1.0-DS) 檔案連結
還有Google app的檔案 (就是market那些) 檔案連結
把這兩個存到SD卡的根目錄
6. 按home開機進入recovery mode
先Wipe -> Wipe data/factory reset & Wipe Dalvik-cache
再選Flash zip from sdcard.
選完update-cm-6.1.0-DS-signed.zip之後
再選gapps-mdpi-tiny-20101020-signed.zip
這樣就刷完了 就變成CyanogenMod 6了 科科
--
只是預設桌布我不是很喜歡 囧
長按桌面就可以去選桌布 XD
2011年5月6日 星期五
2011年4月27日 星期三
2011年4月25日 星期一
udhcp
後面要記得接-i這個參數
ex: udhcp -i ath0
root@OpenWrt:/etc/wing# udhcpc -h
udhcpc: option requires an argument -- h
BusyBox v1.18.4 (2011-04-23 14:11:18 CST) multi-call binary.
Usage: udhcpc [-fbnqoCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]
[-H HOSTNAME] [-V VENDOR] [-x OPT:VAL]... [-O OPT]...
-i,--interface IFACE Interface to use (default eth0)
-p,--pidfile FILE Create pidfile
-s,--script PROG Run PROG at DHCP events (default /usr/share/udhcpc/default.scr)
-t,--retries N Send up to N discover packets
-T,--timeout N Pause between packets (default 3 seconds)
-A,--tryagain N Wait N seconds after failure (default 20)
-f,--foreground Run in foreground
-b,--background Background if lease is not obtained
-n,--now Exit if lease is not obtained
-q,--quit Exit after obtaining lease
-R,--release Release IP on exit
-S,--syslog Log to syslog too
-O,--request-option OPT Request option OPT from server (cumulative)
-o,--no-default-options Don't request any options (unless -O is given)
-r,--request IP Request this IP address
-x OPT:VAL Include option OPT in sent packets (cumulative)
Examples of string, numeric, and hex byte opts:
-x hostname:bbox - option 12
-x lease:3600 - option 51 (lease time)
-x 0x3d:0100BEEFC0FFEE - option 61 (client id)
-F,--fqdn NAME Ask server to update DNS mapping for NAME
-H,-h,--hostname NAME Send NAME as client hostname (default none)
-V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')
-C,--clientid-none Don't send MAC as client identifier
ex: udhcp -i ath0
root@OpenWrt:/etc/wing# udhcpc -h
udhcpc: option requires an argument -- h
BusyBox v1.18.4 (2011-04-23 14:11:18 CST) multi-call binary.
Usage: udhcpc [-fbnqoCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]
[-H HOSTNAME] [-V VENDOR] [-x OPT:VAL]... [-O OPT]...
-i,--interface IFACE Interface to use (default eth0)
-p,--pidfile FILE Create pidfile
-s,--script PROG Run PROG at DHCP events (default /usr/share/udhcpc/default.scr)
-t,--retries N Send up to N discover packets
-T,--timeout N Pause between packets (default 3 seconds)
-A,--tryagain N Wait N seconds after failure (default 20)
-f,--foreground Run in foreground
-b,--background Background if lease is not obtained
-n,--now Exit if lease is not obtained
-q,--quit Exit after obtaining lease
-R,--release Release IP on exit
-S,--syslog Log to syslog too
-O,--request-option OPT Request option OPT from server (cumulative)
-o,--no-default-options Don't request any options (unless -O is given)
-r,--request IP Request this IP address
-x OPT:VAL Include option OPT in sent packets (cumulative)
Examples of string, numeric, and hex byte opts:
-x hostname:bbox - option 12
-x lease:3600 - option 51 (lease time)
-x 0x3d:0100BEEFC0FFEE - option 61 (client id)
-F,--fqdn NAME Ask server to update DNS mapping for NAME
-H,-h,--hostname NAME Send NAME as client hostname (default none)
-V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')
-C,--clientid-none Don't send MAC as client identifier
2011年4月22日 星期五
turnoff Firefox "Work offine"
enter:
about:config
search in filter:
networkmanager
toggle this:
toolkit.networkmanager.disable
ref:
http://ubuntuforums.org/showthread.php?t=851542
--
Fedora 10
about:config
search in filter:
networkmanager
toggle this:
toolkit.networkmanager.disable
ref:
http://ubuntuforums.org/showthread.php?t=851542
--
Fedora 10
訂閱:
文章 (Atom)