标签类目:server

Lighttpd 虚拟主机和多域名的配置

分类:Lighttpd Lighttpd也是一款轻巧不错的web服务器,和apachehttpserver一样,我最开始用lighttpd是在07年的时候,刚好lighttpd支持flv的流媒体播放和防盗链功能,所以就要用了起来。今天这里着重讲下如何配置多个虚拟主机和域名的设置,以Lighttpd的V1.7版本为例:

1、配置多个虚拟主机
打开Lighttpd安装目录下的etc/lighttpd.conf文件,在最后添加如下段:

$HTTP["host"] == "www.linuxany.com" {
    server.document-root = "/webapps/linuxany/website"
    server.errorlog = "/usr/local/lighttpd/logs/linuxany.com-error.log"
    accesslog.filename = "/usr/local/lighttpd/logs/linuxany.com-access.log"}

如果需要多个虚拟主机,则将上面的段复制设置多个即可。

继续阅读 »

Python:实现用socket传输文件

分类:Pythonpython传输文件最重要的有两步:
1).将要传输的文件的信息发送过去,包括文件包,大小以及其它信息;
2).发送端读取文件内容并发送过去,接受端将缓存里面的内容写入文件.
发送端:

继续阅读 »

Howto perform UDP tunneling through SSH connection

分类:DebianIn this tutorial we will are going to provide simple procedure how to to perform UDP tunneling through an SSH connection.Say you need to forward UDP packets between two remote networks securely.

E.g : dns queries from your home machine to your dns servers at work. 继续阅读 »


返回顶部