debian8+php7+nginx1.14.0

debian8搭配的是php5+nginx1.6.2,如果要升级的话必须加入php7和nginx的源才行

deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all

添加key
wget https://www.dotdeb.org/dotdeb.gpg && apt-key add dotdeb.gpg
添加nginx的源

deb http://nginx.org/packages/debian/ jessie nginx
deb-src http://nginx.org/packages/debian/ jessie nginx

添加key

wget http://nginx.org/keys/nginx_signing.key && apt-key add nginx_signing.key

然后apt-get update就可以安卓php7.0和nginx1.14.0了

阅读剩余部分...

Lighttpd的目录保护

有些不想让人随便看的东西会在访问目录时认证一下,对于Lighttpd来说还是比较方便的(参照这里),可选的方式也比较多。我选择htpasswd,一个Apache的工具来生成认证文件,再通过设置lighttpd.conf开启认证。

htpasswd -bc .passwd username password

在lighttpd.conf后面添加

server.modules += ( "mod_auth" )
auth.backend = "htpasswd"

## for htpasswd
auth.backend.htpasswd.userfile = "/home/.passwd"

auth.require = ( "/path/" =>
             (
             # method must be either basic or digest
               "method"  => "basic",
               "realm"   => "download archiv",
               "require" => "user=name1|user=name2"
             )
           )

树莓派连接隐藏了SSID的路由器

树莓派荒了一年多了,最近又准备折腾一下,淘了个无线网卡,装好连接的时候出了点问题。无线网卡一切正常,就是无法获取IP,记得以前有人讲过无法连接隐藏了SSID的路由器。果然取消隐藏之后,连接一切正常。但是让SSID暴露总不是件好事,虽然隐藏也不会增加安全,但总会减少一点麻烦。搜到一个/etc/network/interfaces 配置,能正常使用。

auto lo 
iface lo inet loopback
iface eth0 inet dhcp 
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-scan-ssid 1
wpa-ap-scan 1
wpa-key-mgmt WPA-PSK
wpa-proto RSN WPA
wpa-pairwise CCMP TKIP
wpa-group CCMP TKIP
wpa-ssid "My Secret SSID"
wpa-psk "My SSID PSK" 
iface default inet dhcp 

Debian7+Nginx+php-fpm

最近又开始折腾VPS,原来用的是centos+apache或这debian+apache,nginx太折腾人了,原来偶尔也会照着网上教程来装一个耍下。现在typecho0.9发布了,顺便就在vps上搭建一个debian+Nginx的平台安装一下typecho。

原来的centos和debian6好像都是nginx0.7,现在用了debian7,源里的nginx已经是1.2.1了,配置和以前的不一样,现在支持php-fastcgi和php-fpm,好像后者性能更佳。安装倒是很简单

apt-get install nginx php-fpm

阅读剩余部分...