存档

文章标签 ‘apache’

mod_auth_token for apache

2010年10月5日 16hot 没有评论

apache下的安全下载模块。

What is mod_auth_token ?

mod_auth_token allow you to generate URIS for a determined time window, you can also limit them by IP. This is very useful to handle file downloads, generated URIS can’t be hot-linked (after it expires), also it allows you to protect very large files that can’t be piped trough a script languages due to memory limitation.

http://code.google.com/p/mod-auth-token/

分类: BSD/linux 标签:

将Apache的虚拟主机转换成为Lighttpd的虚拟主机程序

2007年1月3日 16hot 没有评论

有很多Apache的虚拟主机,若要我一个一个的转换成为Lighttpd的虚拟主机,那太痛苦了。

于是用PHP写成这个小程序。

[code]#! /usr/local/bin/php -qn" ; echo "Example: " . $argv[0] . " myvhost.confn" ; echo "Output to file: " . $argv[0] . " myvhost.conf > /tmp/lighttpd_myvhost.confn" ; echo "Author: 16hotn"; echo "Home: http://16hot.blog.isyi.comn"; echo "n" ; exit ;}$AVhostValue = file( $AVhost );for( $i = 0; $i ", $AVhostLine ) ) { $vhostHeader = "#### user:## site:## date: ". date("Y-m-d") ."## admin: 16hot##n" ; echo $vhostHeader, "n" ; } if ( ereg( "^ServerName", $AVhostLine ) ) { $domain = explode( " ", $AVhostLine ); echo "$HTTP["host"] == "" . $domain[1] . "" {n" ; echo " server.name = "" . $domain[1] . ""n" ; } if ( ereg( "^ServerAlias", $AVhostLine ) ) { $aliasDomain = explode( " ", $AVhostLine ); echo " # "; for( $j = 1; $j ", $AVhostLine ) ) { echo " #server.errorlog = "/var/log/httpd/" . $domain[1] . "-error.log"n" ; echo " #accesslog.filename = "/var/log/httpd/" . $domain[1] . "-access.log"n" ; echo "}nnn" ; } } // end for?>[/code]

分类: PHP 标签: , ,