nginx文件目录权限设置(设置访问密码)

1.有时我们web服务器上的某个文件夹只允许特定人员访问,这时我们需要在nginx配置文件中配置该文件夹的访问权限。

2.生成用户名单
在nginx中我们使用htpasswd来生成用户名单
下载这个python文件:http://trac.edgewall.org/export/10770/trunk/contrib/htpasswd.py (nginx wiki里推荐的)
运行示例:

chmod 777 htpasswd.py
./htpasswd.py -c -b htpasswd username password
#-c为生成文件 htpasswd为文件名

继续阅读→

linux下使用BitTorrent Sync

下载

wget https://www.dropbox.com/s/8wd5siesvis80tf/btsync_x64-1.4.111.tar.gz
tar -zxvf btsync_x64-1.4.111.tar.gz

导出配置文件

./btsync --dump-sample-config > btsync.conf

修改配置文件
一定要注释掉"shared_folders" :,不然打不开webgui

./btsync --config btsync.conf

然后打开http://公网IP:8888级就可以像PC客户端一样使用了。

new wifi mini 设置 koolproxy

首先安装以下依赖包,如果默认源里没有,换其他兼容的源。
我的配置

arch all 100
arch noarch 200
arch ralink 300
arch ramips_24kec 400

dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
#src/gz r2_base http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/base
src/gz r2_management http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/management
src/gz r2_oldpackages http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/oldpackages
src/gz r2_packages http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/packages
src/gz r2_routing http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/routing
src/gz r2_telephony http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/telephony

#option check_signature 1
src/gz openwrt_dist http://openwrt-dist.sourceforge.net/packages/OpenWrt/base/ramips
src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/packages/OpenWrt/luci

src/gz packages http://downloads.openwrt.org.cn/PandoraBox/ralink/mt7620_old/packages
src/gz packages_g http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/base

opkg install openssl-util ipset dnsmasq-full diffutils iptables-mod-nat-extra wget ca-certificates libustream-openssl

安装luci app

opkg install http://dl.aenes.com/luci-app-koolproxy_1.0.0-3_all.ipk

更新主程序

cd /usr/share/koolproxy
wget https://raw.githubusercontent.com/koolproxy/koolproxy_rules/master/downloads/mipsel
mv mipsel koolproxy
chmod +x koolproxy

安装根证书
打开http://110.110.110.110下载安装,导入教程
然后可以kill掉adbyby了

openwrt+shadowsocks+chinadns+dns-forwarder配置笔记

设备:newwifi mini
固件:PandoraBox
1.系统-软件包-配置

arch all 100
arch noarch 200
arch ralink 300
arch ramips_24kec 400

dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
#src/gz r2_base http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/base
src/gz r2_management http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/management
src/gz r2_oldpackages http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/oldpackages
src/gz r2_packages http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/packages
src/gz r2_routing http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/routing
src/gz r2_telephony http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/telephony

src/gz openwrt_dist http://openwrt-dist.sourceforge.net/packages/OpenWrt/base/ramips_24kec
src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/packages/OpenWrt/luci

有些依赖包可能没有,可以在如下网址下载

继续阅读→