<?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>4os</title>
	<atom:link href="http://www.4os.org/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.4os.org</link>
	<description>资讯与技术</description>
	<lastBuildDate>Wed, 09 May 2012 11:06:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>nginx ssl https 设置</title>
		<link>http://www.4os.org/index.php/2012/05/09/nginx-ssl-https-%e8%ae%be%e7%bd%ae/</link>
		<comments>http://www.4os.org/index.php/2012/05/09/nginx-ssl-https-%e8%ae%be%e7%bd%ae/#comments</comments>
		<pubDate>Wed, 09 May 2012 11:02:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[SSL_CTX_use_PrivateKey_file]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=478</guid>
		<description><![CDATA[nginx 默认编译就是支持https的,只需要开启ssl就好 配置如下: listen 443 ; server_name 4os.org *.4os.org; ssl on; ssl_certificate gz.crt; ssl_certificate_key gz.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; .... 其中: gz.crt是证书颁发机构给的证书(免费ssl-证书/) gz.key是解密后的私钥 上文中提到的私钥是加密的,可以在startssl的工具箱里边解密,也可以自己做: openssl  rsa -in gz.pri -out gz.key,输入私钥生成时设置的密码,出来的就是不加密的私钥了,nginx启动也不会要你输入密码了 补充: 1. &#8220;SSL_CTX_use_PrivateKey_file fail&#8221;之类的错误,通常都是私钥和证书不匹配造成的,请确认你生成证书与私钥匹配 2.firefox证书需要根证书信息: wget http://www.startssl.com/certs/sub.class1.server.ca.pem cat sub.class1.server.ca.pem &#62;&#62; gz.crt]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2012/05/09/nginx-ssl-https-%e8%ae%be%e7%bd%ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>免费SSL 证书</title>
		<link>http://www.4os.org/index.php/2012/05/09/%e5%85%8d%e8%b4%b9ssl-%e8%af%81%e4%b9%a6/</link>
		<comments>http://www.4os.org/index.php/2012/05/09/%e5%85%8d%e8%b4%b9ssl-%e8%af%81%e4%b9%a6/#comments</comments>
		<pubDate>Wed, 09 May 2012 10:53:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[startssl]]></category>
		<category><![CDATA[免费]]></category>
		<category><![CDATA[证书]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=466</guid>
		<description><![CDATA[一般来说,开启https服务总会涉及到证书问题,通常自签发的证书在浏览器会有&#8221;鲜红告警&#8221;,而CA的证书又颇贵 https://www.startssl.com/ 是一个免费的证书提供商,并支持ie,firefox,chrome等主流浏览器 1.注册,点击右上角的钥匙 选择sign-up,并输入要求填写的所有信息,由于是人工审核,请谨慎填写(必须是私人地址) 2. 注册成功后会收到封邮件(建议留gmail),点击链接会安装一份证书,以后就可以凭证书自动登录该网站了(上图Auth&#8230;) 3. 登录后到控制面板,有3个框:分别是工具箱/证书向导/验证向导 先点验证向导(validations wizard),分别验证邮箱和域名(确认该域名属于你,系统一般会发信给域名的postmaster或者你注册域名时留的邮箱) 4. 证书向导,点Certificats wizard,选择web Server SSL证书,下一步 5. 输入私钥的密码,请特别留意密码你清楚记得 6. 然后系统会提示你保存加密私钥(你稍后可以在工具箱里边解密之,不要现在做,请确认保存该密钥),下一步选择域名和子域名申请证书 7. 提交申请,稍等个大概10分钟,会收到邮件提示证书开通,在后台下载就可以了(Toolbox-Retrieve Certificate) 到这里,SSL 证书已经搞定,nginx配置可以参考http://www.4os.org/index.php/2012/05/09/nginx-ssl-https-%E8%AE%BE%E7%BD%AE/]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2012/05/09/%e5%85%8d%e8%b4%b9ssl-%e8%af%81%e4%b9%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>狩魔手记 烟雨江南最新大作</title>
		<link>http://www.4os.org/index.php/2012/03/19/%e7%8b%a9%e9%ad%94%e6%89%8b%e8%ae%b0-%e7%83%9f%e9%9b%a8%e6%b1%9f%e5%8d%97%e6%9c%80%e6%96%b0%e5%a4%a7%e4%bd%9c/</link>
		<comments>http://www.4os.org/index.php/2012/03/19/%e7%8b%a9%e9%ad%94%e6%89%8b%e8%ae%b0-%e7%83%9f%e9%9b%a8%e6%b1%9f%e5%8d%97%e6%9c%80%e6%96%b0%e5%a4%a7%e4%bd%9c/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 12:10:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[小说]]></category>
		<category><![CDATA[资讯]]></category>
		<category><![CDATA[全本小说]]></category>
		<category><![CDATA[烟雨江南]]></category>
		<category><![CDATA[狩魔手记]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=460</guid>
		<description><![CDATA[http://book.4os.org/chapter/4006 【末世小说类无双经典】 核战过后，杀戮开始蔓延到整个世界。人间秩序完全瓦解，弱肉强食成为第一原则。 当欲望失去了枷锁，就没有了向前的路，只能转左，或者向右。 左边是地狱，右边也是地狱。 烟雨江南 最新大作]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2012/03/19/%e7%8b%a9%e9%ad%94%e6%89%8b%e8%ae%b0-%e7%83%9f%e9%9b%a8%e6%b1%9f%e5%8d%97%e6%9c%80%e6%96%b0%e5%a4%a7%e4%bd%9c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python mysql乱码问题</title>
		<link>http://www.4os.org/index.php/2012/02/29/python-mysql%e4%b9%b1%e7%a0%81%e9%97%ae%e9%a2%98/</link>
		<comments>http://www.4os.org/index.php/2012/02/29/python-mysql%e4%b9%b1%e7%a0%81%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 07:47:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[开发]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[pytho mysql]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=457</guid>
		<description><![CDATA[最近临时有个需求需要用python 爬点中文数据,结果悲催的发现乱码了 查了下资料,这里做下总结: 1. 首先python的代码需要是UTF-8的 # -*- coding: utf-8 -*- 2.确认mysql的数据库和表编码是UTF8的 show create database &#8230; show create table&#8230; 如果不是,alter table或者database设置下编码(请注意alter database编码造成的影响) 3.pytho mysql连接时确认使用UTF8 MySQLdb.connect (&#8230;,charset=&#8217;utf8&#8242;) 4.暂时来说,应该是正常的了,如果还不行,请尝试如下操作: 修改/etc/my.cnf [client]default-character-set = utf8 [mysqld]default-character-set = utf8 在python代码中增加: reload(sys) sys.setdefaultencoding(&#8216;utf-8&#8242;)]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2012/02/29/python-mysql%e4%b9%b1%e7%a0%81%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>停止和重启:nginx与apache的不同</title>
		<link>http://www.4os.org/index.php/2012/02/02/%e5%81%9c%e6%ad%a2%e5%92%8c%e9%87%8d%e5%90%afnginx%e4%b8%8eapache%e7%9a%84%e4%b8%8d%e5%90%8c/</link>
		<comments>http://www.4os.org/index.php/2012/02/02/%e5%81%9c%e6%ad%a2%e5%92%8c%e9%87%8d%e5%90%afnginx%e4%b8%8eapache%e7%9a%84%e4%b8%8d%e5%90%8c/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 10:14:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[kill hup]]></category>
		<category><![CDATA[kill usr1]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=454</guid>
		<description><![CDATA[停止和重启apache与nginx有些许不同,彼此经验不能照搬 TERM: 两者相同,都是发指令给父进程,父进程立刻尝试杀死所有的子进程并退出 USR1: nginx的文档说得很简单:reopen the logfile,实际上的操作是master重新打开日志文件,并改变日志文件权限,是worker进程有读写权限,然后发USR1给worker进程重新打开日志文件,这完全不涉及任何worker进程的重新启动 apache则不同,它的父进程会&#8221;建议&#8221;所有子进程完成当前请求后退出,父进程将重新读取配置文件和日志文件,每个子进程退出后父进程将生成新的子进程 HUP: nginx收到这个信号会做3个事情: 1.重新读取配置文件 2.使用新的配置启动新的worker进程 3.旧的worker完成当前请求后退出 apache的做法不同,父进程接收到该信号后会跟TERM信号杀掉所有子进程,重新读取配置文件,重新打开日志文件,并声称新的子进程来服务.与TERM信号不同的是,父进程不退出,服务不会中止]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2012/02/02/%e5%81%9c%e6%ad%a2%e5%92%8c%e9%87%8d%e5%90%afnginx%e4%b8%8eapache%e7%9a%84%e4%b8%8d%e5%90%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cisco dhcp snoop and arp inspect</title>
		<link>http://www.4os.org/index.php/2011/12/07/cisco-dhcp-snoop-and-arp-inspect/</link>
		<comments>http://www.4os.org/index.php/2011/12/07/cisco-dhcp-snoop-and-arp-inspect/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 10:32:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[arp inspect]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[dhcp snooping]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=434</guid>
		<description><![CDATA[最近在调整网络设置,因此重温了下DHCP SNOOP 和ARP INSPECT 的原理和设置
一 DHCP SNOOPING
二 ARP INSPECT
三 注意点
]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2011/12/07/cisco-dhcp-snoop-and-arp-inspect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ddos 与 黑洞路由</title>
		<link>http://www.4os.org/index.php/2011/12/03/ddos-%e4%b8%8e-%e9%bb%91%e6%b4%9e%e8%b7%af%e7%94%b1/</link>
		<comments>http://www.4os.org/index.php/2011/12/03/ddos-%e4%b8%8e-%e9%bb%91%e6%b4%9e%e8%b7%af%e7%94%b1/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 15:30:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[blackhole]]></category>
		<category><![CDATA[ddos]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[黑洞路由]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=429</guid>
		<description><![CDATA[通常遇到ddos或者其他攻击,简单想到的办法是iptable,比如

iptable -A INPUT -s IP -j DROP

实际上,超大规模的攻击使用iptable过滤会非常耗CPU,一般建议使用黑洞路由]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2011/12/03/ddos-%e4%b8%8e-%e9%bb%91%e6%b4%9e%e8%b7%af%e7%94%b1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ESXI 控制台热键的问题</title>
		<link>http://www.4os.org/index.php/2011/11/29/esxi-%e6%8e%a7%e5%88%b6%e5%8f%b0%e7%83%ad%e9%94%ae%e7%9a%84%e9%97%ae%e9%a2%98/</link>
		<comments>http://www.4os.org/index.php/2011/11/29/esxi-%e6%8e%a7%e5%88%b6%e5%8f%b0%e7%83%ad%e9%94%ae%e7%9a%84%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 10:04:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[ESXI]]></category>
		<category><![CDATA[热键]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=427</guid>
		<description><![CDATA[最近发现esxi 退出控制台的热键不起作用,Ctrl+ALT按下去鼠标还是出不来 查了下资料,据说是要Ctrl+ALT+Space,hold 住CTRL+ALT放开SPACE,然后按ESC,嗯,这个办法可行 其实还有个更简单的办法,按住CTRL+ALT,再点下鼠标,嗯,好了&#8230;嘿嘿]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2011/11/29/esxi-%e6%8e%a7%e5%88%b6%e5%8f%b0%e7%83%ad%e9%94%ae%e7%9a%84%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game and heart</title>
		<link>http://www.4os.org/index.php/2011/11/29/game-and-heart/</link>
		<comments>http://www.4os.org/index.php/2011/11/29/game-and-heart/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 04:04:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[资讯]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=423</guid>
		<description><![CDATA[有个图片放在桌面很久了,一直都不舍得删除 就在这里放出来吧]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2011/11/29/game-and-heart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lspci: command not found</title>
		<link>http://www.4os.org/index.php/2011/11/29/lspci-command-not-found/</link>
		<comments>http://www.4os.org/index.php/2011/11/29/lspci-command-not-found/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 03:39:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[lspci]]></category>

		<guid isPermaLink="false">http://www.4os.org/?p=420</guid>
		<description><![CDATA[yum install pciutils then,try lspci]]></description>
		<wfw:commentRss>http://www.4os.org/index.php/2011/11/29/lspci-command-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-8780620-8']);
  _gaq.push(['_setDomainName', '.4os.org']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

