nginx:测试

© ㄒiger / Posted in 主机域名 / March 30, 2012

if ($http_referer ~* tiger.im) {
rewrite ^/ http://www.tiger.im/;
} 

© ㄒiger / Posted in 主机域名,程序代码 / November 29, 2011

AutoNProxy 是基于nginx的反向代理(v0.0.3)

http://code.google.com/p/autosetup/

wget http://autosetup.googlecode.com/files/AutoNProxy-v0.0.3.sh

chmod 755 AutoNProxy-v0.0.3.sh

./AutoNProxy-v0.0.3.sh 

修改proxy.conf 文件。重启nginx。。搞定。。

service httpd stop&&chkconfig httpd off

/usr/local/nginx/sbin/nginx -s reload 重启VPS

© ㄒiger / Posted in 主机域名,程序代码 / November 15, 2011

phurl 短网址程序

nginx伪静态规则: 

location / {

            rewrite ^/(.+)$ /redirect.php?alias=$1 last;

        }
apache规则

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteOptions MaxRedirects=1
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule ^([a-zA-Z0-9_-]+)$ redirect.php?alias=$1 [L]
</IfModule>

© ㄒiger / Posted in 主机域名 / October 15, 2011

lnmp用的nginx/0.8.54的,看到论坛说nginx升级到1.15了

首先下载Nginx:执行wget http://nginx.org/download/nginx-1.1.5.tar.gz

tar zxvf nginx-1.1.5.tar.gz

再执行 ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module 

然后make,但不要make install

编译完,在objs目录下有一个nginx执行文件,就是它了。

备份下原来老的nginx文件

继续阅读全文... »

© ㄒiger / Posted in 程序代码 / October 10, 2011

Description

"pdirl" (PHPDirListing) is a tiny directory listing program. It is meant to be better looking and more useful than the directory listings produced by Apache. I didn't want to reinvent the wheel so I looked for an existing PHP script and I've found PHPDL by Greg Johnson, I added some features to it. (1.0.x is no longer based on PHPDL.)

官方网站:http://pdirl.newroots.de/  演示:http://soft.www.com.ht/

官方demo:http://pdirl.newroots.de/examples/

下载地址:http://soft.www.com.ht/code/pdirl-1.0.3r44.zip

Installation

It consists of normal and hidden files ('.htaccess' and '.pdirl'), put them all in a directory and you will see a nice directory listing in it.

 

继续阅读全文... »