<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu,debian,redhat -linuxany.com &#187; server</title>
	<atom:link href="http://www.linuxany.com/archives/tag/server/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 08:59:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Lighttpd 虚拟主机和多域名的配置</title>
		<link>http://www.linuxany.com/archives/1516.html</link>
		<comments>http://www.linuxany.com/archives/1516.html#comments</comments>
		<pubDate>Mon, 28 Mar 2011 09:14:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1516</guid>
		<description><![CDATA[Lighttpd也是一款轻巧不错的web服务器，和apachehttpserver一样，我最开始用lighttpd是在07年的时候，刚好lighttpd支持flv的流媒体播放和防盗链功能，所以就要用了起来。今天这里着重讲下如何配置多个虚拟主机和域名的设置，以Lighttpd的V1.7版本为例： 1、配置多个虚拟主机 打开Lighttpd安装目录下的etc/lighttpd.conf文件，在最后添加如下段： $HTTP[&#34;host&#34;] == &#34;www.linuxany.com&#34; {&#160;&#160; &#160;server.document-root = &#34;/webapps/linuxany/website&#34;&#160;&#160; &#160;server.errorlog = &#34;/usr/local/lighttpd/logs/linuxany.com-error.log&#34;&#160;&#160; &#160;accesslog.filename = &#34;/usr/local/lighttpd/logs/linuxany.com-access.log&#34;} 如果需要多个虚拟主机，则将上面的段复制设置多个即可。 2、多域名指向同一个目录 有时候我们需要将同一个应用配置多个域名，这时我们就可以采用下面的段来进行配置： $HTTP[&#34;host&#34;] =~ &#34;^(python\.linuxany\.com&#124;perl\.linuxany\.com)$&#34; {&#160;&#160; &#160;server.document-root = &#34;/linuxany/program/app&#34;&#160;&#160; &#160;server.errorlog = &#34;/usr/local/lighttpd/logs/linuxany-app-error.log&#34;&#160;&#160; &#160;accesslog.filename = &#34;/usr/local/lighttpd/logs/linuxany-app-access.log&#34;} 注意这个与单个域名配置不同的是：前者使用的是==，而后者使用的是=~这样，这样我们就完成了一个应用多个域名的配置了，然后重启lightpd即可。 3、多个域名跳转到同一个域名，可带路径 $HTTP[&#34;host&#34;] =~ &#34;^(python\.linuxany\.com&#124;perl\.linuxany\.com&#124;php\.linuxany\.com)$&#34; {&#160;&#160; &#160; &#160; url.redirect = ( &#34;^/(.*)&#34; =&#62; &#34;http://www.linuxany.com/$1&#34; )} 您还可能感兴趣的内容Nginx concat模块减轻http请求连接数Nginx 让浏览器告诉你负载均衡分到了哪台服务器Python 进行DNS解析监控Python 抓包获取网卡字节流Nginx proxy_pass到$host的问题与解决方法]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1516.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python:实现用socket传输文件</title>
		<link>http://www.linuxany.com/archives/1434.html</link>
		<comments>http://www.linuxany.com/archives/1434.html#comments</comments>
		<pubDate>Sun, 24 Oct 2010 13:18:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[socket]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1434</guid>
		<description><![CDATA[python传输文件最重要的有两步: 1).将要传输的文件的信息发送过去,包括文件包,大小以及其它信息; 2).发送端读取文件内容并发送过去,接受端将缓存里面的内容写入文件. 发送端: from socket import * import&#160;os import&#160;structfrom socket import * import&#160;os import&#160;struct &#160; ADDR = ('192.168.1.103',8000) BUFSIZE = 1024 filename = 'client.py' FILEINFO_SIZE=struct.calcsize('128s32sI8s') &#160; sendSock = socket(AF_INET,SOCK_STREAM) sendSock.connect(ADDR) &#160; fhead=struct.pack('128s11I',filename,0,0,0,0,0,0,0,0,os.stat(filename).st_size,0,0) sendSock.send(fhead) &#160; fp = open(filename,'rb') while&#160;1: &#160; &#160; filedata = fp.read(BUFSIZE) &#160; &#160; if&#160;not filedata: break &#160; &#160; sendSock.send(filedata) fp.close() &#160; sendSock.close() [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1434.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Howto perform UDP tunneling through SSH connection</title>
		<link>http://www.linuxany.com/archives/406.html</link>
		<comments>http://www.linuxany.com/archives/406.html#comments</comments>
		<pubDate>Fri, 29 Aug 2008 15:19:50 +0000</pubDate>
		<dc:creator>x72</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[forward]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[tunneling]]></category>
		<category><![CDATA[udp]]></category>

		<guid isPermaLink="false">http://www.linuxlaptop.cn/?p=438</guid>
		<description><![CDATA[In 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. you can use the following way : 1. Connect [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/406.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

