{"id":2276,"date":"2014-01-02T09:47:00","date_gmt":"2014-01-02T01:47:00","guid":{"rendered":"http:\/\/www.zuola.com\/weblog\/2014\/01\/2276.htm"},"modified":"2014-01-02T09:47:00","modified_gmt":"2014-01-02T01:47:00","slug":"%e5%9c%a8centos%e9%87%8c%e7%94%a8nginx%e5%92%8cxinetd%e5%88%86%e5%88%ab%e5%ae%9e%e7%8e%b0http%e5%92%8cssl%e7%9a%84%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.zuola.com\/weblog\/2014\/01\/2276.htm","title":{"rendered":"\u5728centos\u91cc\u7528nginx\u548cxinetd\u5206\u522b\u5b9e\u73b0HTTP\u548cSSL\u7684\u53cd\u5411\u4ee3\u7406"},"content":{"rendered":"<h3>HTTP\u7f51\u7ad9\u7684\u53cd\u5411\u4ee3\u7406<\/h3>\n<p>\u5728<a href=\"http:\/\/www.365ezone.com\/billing\/aff.php?aff=090\">365ezone<\/a>\u4e0a\u4e70\u4e86\u4e2a30\u5200\u4e00\u5e74\u7684VPS\uff0c\u6709\u72ec\u7acbIP\uff0c\u62ff\u6765\u5b89\u88c5\u4e2anginx\u5f53\u53cd\u5411\u4ee3\u7406\u89e3\u5c01\u67d0\u4e9b\u88ab\u5c4f\u853dIP\u7684\u7f51\u7ad9\u5f88\u65b9\u4fbf\u3002\u4f46\u719f\u6089\u4e86ubuntu\u7684apt-get\uff0c\u4f46\u4e0d\u719f\u6089centos\u7684yum\uff0c\u641c\u7d22\u5230<a href=\"http:\/\/my.oschina.net\/wuzhaohui\/blog\/120844\">\u8fd9\u4e2a\u94fe\u63a5<\/a>\uff0c\u4f5c\u4e2a\u7b14\u8bb0:<\/p>\n<p>vi \/etc\/yum.repos.d\/nginx.repo<\/p>\n<p>\u5199\u5165\u4e0b\u5217\u4fe1\u606f\uff0c<\/p>\n<blockquote><p>[nginx]<br \/>name=nginx repo<br \/>baseurl=http:\/\/nginx.org\/packages\/centos\/5\/$basearch\/<br \/>gpgcheck=0<br \/>enabled=1<\/p><\/blockquote>\n<p>\u6ce8\uff1a\u5c06\u4e0a\u9762baseurl\u7684centos\u66ff\u6362\u6210\u60a8\u7684\u7cfb\u7edf\u4fe1\u606f\uff0c\u4f8b\u5982\uff1a centos\u3001rhel<\/p>\n<p>\u5c06\u4e0a\u9762baseurl\u4e2d5\u66ff\u6362\u6210\u60a8\u7684\u7cfb\u7edf\u7248\u672c\uff0c\u4f8b\u5982\uff1a5\u30016<\/p>\n<p>\u7136\u540e\u8fd0\u884c yum install nginx<\/p>\n<p>\u5c31\u53ef\u4ee5\u5b89\u88c5nginx\u4e86<\/p>\n<p>\u7136\u540e\u5230\/etc\/nginx\/conf.d\/\u91cc\u6dfb\u52a0nginx\u914d\u7f6e\u6587\u4ef6\u5c31\u53ef\u4ee5\u7528\u4e86\uff0c\u914d\u7f6e\u6587\u4ef6\u4e00\u5b9a\u8981\u7528.conf\u6587\u4ef6\u540e\u7f00\u3002<\/p>\n<p>\u67e5\u770bnginx\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6709\u8bed\u6cd5\u9519\u8bef\u7528 nginx -t\u547d\u4ee4<\/p>\n<p>\u542f\u7528nginx\u7528 nginx\u547d\u4ee4\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p>\u91cd\u542f nginx \u7528&nbsp;<span style=\"font-family: Menlo; font-size: 11px;\">killall -HUP nginx&nbsp;<\/span>\u547d\u4ee4<\/p>\n<h3>SSL\u7f51\u7ad9\u7684\u53cd\u5411\u4ee3\u7406<\/h3>\n<p>centos\u4f3c\u4e4e\u5185\u7f6e\u5b89\u88c5\u4e86xinetd<br \/>\u7528vi \/etc\/xinetd.d\/https<br \/>\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9<\/p>\n<div style=\"font-family: Menlo; font-size: 11px;\">service https<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">{<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; disable&nbsp; &nbsp; &nbsp; &nbsp; =no<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flags&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =REUSE<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; socket_type&nbsp; &nbsp; &nbsp; &nbsp; =stream<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wait&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =no<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =root<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; port&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =443<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; protocol&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =tcp<\/div>\n<div style=\"font-family: Menlo; font-size: 11px;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; redirect&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =69.163.141.215 443&nbsp;<\/div>\n<p><\/p>\n<div style=\"font-family: Menlo; font-size: 11px;\">}<\/div>\n<p>\u8fd9\u6837\uff0cSSL\u7684\u53cd\u5411\u4ee3\u7406\u4e5f\u53ef\u7528\u4e86\uff0c\u53ea\u8981\u8fd9\u4e2aIP\u6ca1\u6709\u88ab\u5c01\uff0c\u8fd9\u4e2a\u7f51\u7ad9\u4e5f\u5c31\u5168\u90e8\u89e3\u5c01\u4e86\u3002<\/p>\n<div><\/div>\n<div>\u5f53\u7136\uff0c\u5982\u679c\u4f60\u7684\u7f51\u7ad9\u6b63\u5728\u98ce\u53e3\u6d6a\u5c16\u4e0a\uff0cGFW\u6709\u7cbe\u529b\u8ffd\u6740\u4f60\u7684\u6bcf\u4e00\u4e2a\u65b0IP\uff0c\u6211\u51e0\u5e74\u524d\u66fe\u5c1d\u8bd5\u8fc7\u628a\u6211\u7684\u88ab\u8ffd\u6740\u7684\u7f51\u7ad9zuola.com\u7684IP\u6307\u5411\u7ebd\u7ea6\u65f6\u62a5\u82f1\u6587\u7f51\u7ad9\uff0cGFW\u5c45\u7136\u6ca1\u6709\u4e0a\u5f53\u53bb\u5c01\u9501\u7ebd\u7ea6\u65f6\u62a5\u7684\u7f51\u7ad9\u7ad9\u3002\u6240\u4ee5\uff0c\u4ee5\u4e0a\u65b9\u6cd5\u53ea\u9002\u5408\u6084\u6084\u7684\u7ed9\u81ea\u5df1\u7f51\u7ad9\u89e3\u5c01\u4e00\u4e0b\u5b50\uff0c\u6ca1\u6709\u7ec8\u7ea7\u89e3\u51b3\u65b9\u6848\uff0c\u4e5f\u5c31\u662f\u4eba\u4eec\u8bf4\u7684\u201c\u6ca1\u6709\u94f6\u5f39\u201d\u3002<\/div>\n<div>\u6765\u81ea\u5468\u66d9\u5149\u7684BLOGSPOT\u7a7a\u95f4<\/div>\n","protected":false},"excerpt":{"rendered":"<p>HTTP\u7f51\u7ad9\u7684\u53cd\u5411\u4ee3\u7406 \u5728365ezone\u4e0a\u4e70\u4e86\u4e2a30\u5200\u4e00\u5e74\u7684VPS\uff0c\u6709\u72ec\u7acbIP <span class=\"readmore\"><a href=\"https:\/\/www.zuola.com\/weblog\/2014\/01\/2276.htm\">Continue Reading &#8230;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2276","post","type-post","status-publish","format-standard","hentry","category-random"],"views":113,"_links":{"self":[{"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/posts\/2276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/comments?post=2276"}],"version-history":[{"count":0,"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/posts\/2276\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/media?parent=2276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/categories?post=2276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zuola.com\/weblog\/wp-json\/wp\/v2\/tags?post=2276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}