<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://blog.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://blog.liuts.com/post/237/</link>
<title><![CDATA[基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>刘天斯 &lt;liutiansi@gmail.com&gt;</author>
<category><![CDATA[Python]]></category>
<pubDate>Tue, 09 Apr 2013 13:39:44 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;准备在小组内部做一次《HTTP协议分析》的培训，为了不受限于Request header与response header的内容，想更深入了解服务器端是如何响应、处理一个请求的，花了几天时间写了Yorserver，目前基本的功能都实现，功能清单如下：<br/>1、支持自定义response服务及协议版本；<br/>2、支持Expires及max-age的功能；<br/>3、支持多进程或线程开启；<br/>4、支持错误页及默认页配置；<br/>5、支持access_log及error_log配置；<br/>6、支持gzip压缩配置；<br/>7、支持安全套连接服务HTTPS；<br/>8、支持HTTP MIME自定义配置；<br/>9、支持php、perl、python脚本cgi访问；<br/>10、支持配置文件。<br/>(Centos6.*环境测试通过)<br/><br/><strong>一、配置文件说明yorserver.conf</strong><br/><textarea name="code" class="c" rows="15" cols="100">
# This is the  Yorserver configuration file.
# server_version: Add response HTTP header server version information.
server_version = "YorServer1.0"

# bind_ip: Allows you to bind yorserver to specific IP addresses.
#
bind_ip="0.0.0.0"

# port: Allows you to bind yorserver's port, http default 80 and Https 443.
port=80

# sys_version: Add response HTTP header python version information.
sys_version = ""

# protocol_version: Add response HTTP header protocol version. 
protocol_version = "HTTP/1.0"

# Expires: Add response HTTP header Expires and Max-age version. format:d/h/m(Day/Hour/Minute).
Expires="7d"

# Multiprocess: configure yorserver Multi process support(on/off).
Multiprocess="off"

# Multithreading: configure yorserver Multi threading support(on/off).
Multithreading="on"

# DocumentRoot: configure web server document root.
DocumentRoot="/usr/local/yorserver/www"

# page404: configure web server deafult 404 page.
page404="/404.html"

# indexpage: configure web server deafult index page.
indexpage="/index.html"

# Logfile: configure web server log file path,disable logs Logfile="".
Logfile="/usr/local/yorserver/logs/access.log"

# errorfile: configure web server error file path.
errorfile="/usr/local/yorserver/logs/error.log"

[gzip]
# gzip: Enable(on) or Disable(off) gzip options.
gzip="on"

# configure compress level(1~9)
compresslevel=1

[ssl]
# ssl: Enable(on) or Disable(off) HTTPS options,port options must configure "443".
ssl="off"

# configure privatekey and certificate pem.
privatekey="/home/webkey/privkey.pem"
certificate="/home/webkey/cacert.pem"

[cgim]
# cgi_moudle: Enable(on) or Disable(off) cgi support.
cgi_moudle="on"

# cgi_path: configure cgi path,multiple cgi path use ',' delimited,cgi_path in bin directory.
cgi_path='/cgi-bin',

# cgi_extensions: configure cgi file extension.
cgi_extensions="('.cgi','.py','.pl','.php')"

# contentTypes: configure file mime support.
[contentTypes]
css="text/css"
doc="application/msword"
gif="image/gif"
gz="application/x-gzip"
html="text/html"
htm="text/html"
esp="text/html"
ics="text/calendar"
jpeg="image/jpeg"
jpg="image/jpeg"
js="text/javascript"
pdf="application/pdf"
png="image/png"
rtf="application/rtf"
txt="text/plain"
zip="application/zip"
cgi="text/html"
py="text/html"
pl="text/html"
php="text/html"
</textarea><br/><br/><strong>程序截图</strong><br/>1、访问日志<br/><a href="http://liuts-blog.b0.upaiyun.com/201304/1366039352_9551647c.jpg" target="_blank"><img src="http://liuts-blog.b0.upaiyun.com/201304/1366039352_9551647c.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>2、目录列表<br/><a href="https://blog.liuts.com/attachment.php?fid=335" target="_blank"><img src="https://blog.liuts.com/attachment.php?fid=335" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>3、gzip压缩<br/><a href="https://blog.liuts.com/attachment.php?fid=336" target="_blank"><img src="https://blog.liuts.com/attachment.php?fid=336" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>4、HTTPS支持<br/><a href="https://blog.liuts.com/attachment.php?fid=337" target="_blank"><img src="https://blog.liuts.com/attachment.php?fid=337" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>5、PHP CGI<br/><a href="https://blog.liuts.com/attachment.php?fid=338" target="_blank"><img src="https://blog.liuts.com/attachment.php?fid=338" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>6、python CGI<br/><a href="https://blog.liuts.com/attachment.php?fid=339" target="_blank"><img src="https://blog.liuts.com/attachment.php?fid=339" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/><strong>三、安装</strong><br/>https://github.com/yorkoliu/pyauto/tree/master/%E7%AC%AC%E5%85%AB%E7%AB%A0<br/><br/><br/><strong>四、在线测试</strong>(可启用httpwatch查看效果)<br/><a href="http://blog.liuts.com:8080/" target="_blank">http://blog.liuts.com:8080/</a><br/><a href="http://blog.liuts.com:8080/cgi-bin/index.pl" target="_blank">http://blog.liuts.com:8080/cgi-bin/index.pl</a><br/><a href="http://blog.liuts.com:8080/cgi-bin/index.php" target="_blank">http://blog.liuts.com:8080/cgi-bin/index.php</a><br/><a href="http://blog.liuts.com:8080/cgi-bin/index.py" target="_blank">http://blog.liuts.com:8080/cgi-bin/index.py</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment1549</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>icecream &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 12 Apr 2013 15:35:35 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment1549</guid> 
<description>
<![CDATA[ 
	不开源吗？
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2297</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>slevin &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 04 May 2013 12:27:40 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2297</guid> 
<description>
<![CDATA[ 
	同上，强烈要求开源！看具体到底怎么实现的!
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2308</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>lele &lt;abiaogz@163.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 11 May 2013 08:31:18 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2308</guid> 
<description>
<![CDATA[ 
	博主用的调试器很不错，之前只有用到3.1版的。。博主的是正版的吧？
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2364</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>台式万用表 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sun, 14 Jul 2013 02:51:20 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2364</guid> 
<description>
<![CDATA[ 
	这个还是挺好的啊
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2389</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>视频贺卡 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 29 Jul 2013 01:16:57 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2389</guid> 
<description>
<![CDATA[ 
	这个轻量级很有意思也
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2393</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>天津装饰 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sun, 25 Aug 2013 00:34:22 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2393</guid> 
<description>
<![CDATA[ 
	这个量级还是挺好的
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2437</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>ccav &lt;ccavab@126.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 29 Jan 2014 15:02:01 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2437</guid> 
<description>
<![CDATA[ 
	代码能开源吗？很感兴趣！
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2443</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>燕十三 &lt;admin@yanshisan.me&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 07 May 2014 09:32:53 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2443</guid> 
<description>
<![CDATA[ 
	无语，源码都给了还要怎么才叫开源呢。。。。。
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2444</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>anom &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 08 May 2014 09:47:54 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2444</guid> 
<description>
<![CDATA[ 
	yorserver看上去写的不错,没看到源代码在哪里,还有可执行文件是用什么软件生成的
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/237/#blogcomment2448</link>
<title><![CDATA[[评论] 基于Python实现的轻量级WebServer-Yorserver1.0]]></title> 
<author>koy &lt;maxiaolei007@sina.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 23 Jun 2014 08:14:39 +0000</pubDate> 
<guid>https://blog.liuts.com/post/237/#blogcomment2448</guid> 
<description>
<![CDATA[ 
	@燕十三~~tar包里面是编译后的，不是源代码
]]>
</description>
</item>
</channel>
</rss>