{"id":71,"date":"2017-05-08T14:38:45","date_gmt":"2017-05-08T14:38:45","guid":{"rendered":"https:\/\/oimi.me\/?p=71"},"modified":"2017-05-08T14:38:45","modified_gmt":"2017-05-08T14:38:45","slug":"debian-8-x-ubuntu-16-04-x-%e6%90%ad%e5%bb%ba-isso-%e8%af%84%e8%ae%ba%e7%b3%bb%e7%bb%9f%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/myya.net\/index.php\/2017\/05\/08\/debian-8-x-ubuntu-16-04-x-%e6%90%ad%e5%bb%ba-isso-%e8%af%84%e8%ae%ba%e7%b3%bb%e7%bb%9f%e6%95%99%e7%a8%8b\/","title":{"rendered":"Debian 8.x \/ Ubuntu 16.04.x \u642d\u5efa Isso \u8bc4\u8bba\u7cfb\u7edf\u6559\u7a0b"},"content":{"rendered":"<p>\u7531\u4e8e<a href=\"http:\/\/dev.duoshuo.com\/threads\/58d1169ae293b89a20c57241\">\u67d0\u8bf4<\/a>\u8981\u5173\u95ed\uff0c<a href=\"http:\/\/changyan.kuaizhan.com\/\">\u67d0\u8a00<\/a>\u5bf9 HTTPS \u652f\u6301\u4e0d\u53cb\u597d\uff0c<a href=\"https:\/\/gentie.163.com\/\">\u67d0\u6613<\/a>\u5fc5\u987b\u767b\u9646\u624d\u53ef\u4ee5\u4e14\u5728\u56fd\u5916\u8bbf\u95ee\u5361\u51fa\u7fd4\uff0c\u5269\u4e0b\u56fd\u4ea7\u7684\u670d\u52a1\u90fd\u4e00\u822c\uff0c\u800c\u56fd\u5916\u670d\u52a1 <a href=\"https:\/\/disqus.com\/\">Disqus<\/a> \u662f\u4e2a\u4e0d\u5b58\u5728\u7684\u7f51\u7ad9\u5e76\u4e14\u4f1a<a href=\"https:\/\/help.disqus.com\/customer\/portal\/articles\/466259-privacy-policy\">\u52a0\u8f7d\u4e00\u5927\u5806<\/a>\u8ffd\u8e2a\u7684 JS\uff0c\u5bf9\u4e8e\u6709\u6d01\u7656\u7684\u535a\u4e3b\u6765\u8bf4\uff0c\u5168\u4e16\u754c\u7b2c\u4e09\u65b9\u8bc4\u8bba\u7cfb\u7edf\u57fa\u672c\u6ca1\u6709\u4e00\u4e2a\u597d\u7528\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u8003\u8651\u81ea\u5df1\u642d\u5efa Isso \u8bc4\u8bba\u7cfb\u7edf<!--more--><\/p>\n<p><a href=\"https:\/\/posativ.org\/isso\/\">Isso<\/a> \u662f\u57fa\u4e8e Python \u5199\u7684\u4e00\u5957\u8bc4\u8bba\u7cfb\u7edf\uff0c\u7528\u9014\u5c31\u662f\u4ee3\u66ff\u4ee5\u4e0a\u8bf4\u7684\u7b2c\u4e09\u65b9\u4e0d\u9760\u8c31\u5e73\u53f0\uff0c\u800c\u5b98\u7f51\u7684<a href=\"https:\/\/posativ.org\/isso\/docs\/install\/\">\u6559\u7a0b<\/a>\u5751\u5f88\u591a\uff0c\u65b0\u624b\u6ca1\u6709\u63a5\u89e6\u8fc7\u8fd0\u7ef4\u5de5\u4f5c\u5b89\u88c5\u8d77\u6765\u96be\u5ea6\u8f83\u5927\uff0c\u6240\u4ee5\u6211\u5c31\u6574\u7406\u4e00\u4e0b\u57fa\u672c\u7684\u6559\u7a0b\uff0c\u5c3d\u91cf\u53ef\u4ee5\u8ba9\u6240\u6709\u7528\u6237\u90fd\u80fd\u81ea\u884c\u642d\u5efa\u8bc4\u8bba\u7cfb\u7edf<\/p>\n<p><strong>\u672c\u6587\u6240\u6709\u64cd\u4f5c\u5747\u5728 root \u7528\u6237\u4e0b\u8fdb\u884c\uff0c\u8bf7\u81ea\u884c\u5207\u6362<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7edf<\/p>\n<pre class=\"hljs sql\"><code class=\"language-bash\">apt-get <span class=\"hljs-keyword\">update<\/span> &amp;&amp; apt-<span class=\"hljs-keyword\">get<\/span> <span class=\"hljs-keyword\">upgrade<\/span>  \n<\/code><\/pre>\n<p>\u5982\u679c\u60a8\u7528\u7684 Debian 8.x \u5f00\u542f\u4e86 backports \u4e5f\u53ef\u4ee5\u66f4\u65b0\u4e0b<\/p>\n<pre class=\"hljs sql\"><code class=\"language-bash\">apt-get -t jessie-backports <span class=\"hljs-keyword\">update<\/span> &amp;&amp; apt-<span class=\"hljs-keyword\">get<\/span> -t jessie-backports <span class=\"hljs-keyword\">upgrade<\/span>  \n<\/code><\/pre>\n<h2 id=\"1pip\"><span id=\"h-1pip\"><\/span>1\u3001\u5b89\u88c5 PIP<\/h2>\n<p><a href=\"https:\/\/pypi.python.org\/pypi\/pip\">pip<\/a> (Python Package Index) \u662f Python \u8f6f\u4ef6\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u7b80\u5355\u65b9\u4fbf\u7701\u53bb\u81ea\u5df1\u7f16\u8bd1\u5b89\u88c5\u7684\u5404\u79cd\u9ebb\u70e6<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u5de5\u5177\u5305<\/p>\n<pre class=\"hljs sql\"><code class=\"language-bash\">apt-get <span class=\"hljs-keyword\">install<\/span> python-dev <span class=\"hljs-keyword\">build<\/span>-essential -y  \n<\/code><\/pre>\n<p>\u7136\u540e\u76f4\u63a5\u5b89\u88c5 pip<\/p>\n<pre class=\"hljs cs\"><code class=\"language-bash\">apt-<span class=\"hljs-keyword\">get<\/span> install python-pip  \n<\/code><\/pre>\n<p>\u63a5\u7740\u66f4\u65b0\u5347\u7ea7 pip<\/p>\n<pre class=\"hljs sql\"><code class=\"language-bash\">pip <span class=\"hljs-keyword\">install<\/span> <span class=\"hljs-comment\">--upgrade pip  <\/span>\n<\/code><\/pre>\n<h3 id=\"pip\"><span id=\"h-pip\"><\/span>pip \u7684\u5e38\u89c1\u7528\u6cd5<\/h3>\n<p>\u5b89\u88c5 \/ \u5347\u7ea7\u67d0\u8f6f\u4ef6<\/p>\n<pre class=\"hljs sql\"><code class=\"language-bash\">pip <span class=\"hljs-keyword\">install<\/span> <span class=\"hljs-comment\">--upgrade &lt;package name&gt;  <\/span>\n<\/code><\/pre>\n<p>\u5378\u8f7d\u67d0\u8f6f\u4ef6<\/p>\n<pre class=\"hljs sql\"><code class=\"language-bash\">pip <span class=\"hljs-keyword\">uninstall<\/span> &lt;<span class=\"hljs-keyword\">package<\/span> <span class=\"hljs-keyword\">name<\/span>&gt;  \n<\/code><\/pre>\n<p>\u641c\u7d22\u67d0\u8f6f\u4ef6<\/p>\n<pre class=\"hljs xml\"><code class=\"language-bash\">pip search <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">search<\/span> <span class=\"hljs-attr\">query<\/span>&gt;<\/span>  \n<\/code><\/pre>\n<p>\u83b7\u53d6\u67d0\u8f6f\u4ef6\u4fe1\u606f<\/p>\n<pre class=\"hljs sql\"><code class=\"language-bash\">pip <span class=\"hljs-keyword\">show<\/span> &lt;<span class=\"hljs-keyword\">package<\/span> <span class=\"hljs-keyword\">name<\/span>&gt;  \n<\/code><\/pre>\n<h2 id=\"2isso\"><span id=\"h-2isso\"><\/span>2\u3001\u5b89\u88c5 Isso<\/h2>\n<p>\u4e00\u6761\u547d\u4ee4\u5373\u53ef<\/p>\n<pre class=\"hljs nginx\"><code class=\"language-bash\"><span class=\"hljs-attribute\">pip<\/span> install isso  \n<\/code><\/pre>\n<p>\u6b64\u65f6 isso \u5df2\u7ecf\u88ab\u5b8c\u6574\u5b89\u88c5\u5728 <code>\/usr\/local\/bin\/isso<\/code> \u4e86<\/p>\n<h2 id=\"3sqlite3\"><span id=\"h-3sqlite3\"><\/span>3\u3001\u5b89\u88c5 SQLite3<\/h2>\n<p>\u7531\u4e8e Isso \u7528\u7684\u662f SQlite3 \u6570\u636e\u5e93\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5<\/p>\n<pre class=\"hljs cs\"><code class=\"language-bash\">apt-<span class=\"hljs-keyword\">get<\/span> install sqlite3  \n<\/code><\/pre>\n<p>\u5982\u679c Debian 8.x \u5f00\u542f\u4e86 Backports \uff0c\u53ef\u4ee5\u7528\u5982\u4e0b\u547d\u4ee4<\/p>\n<pre class=\"hljs cs\"><code class=\"language-bash\">apt-<span class=\"hljs-keyword\">get<\/span> -t jessie-backports install sqlite3  \n<\/code><\/pre>\n<p>\u65b0\u5efa\u7acb\u4e00\u4e2a\u6570\u636e\u5e93\u76ee\u5f55\u5e76\u8bbe\u7f6e\u6743\u9650<\/p>\n<pre class=\"hljs php\"><code class=\"language-bash\">mkdir -p \/<span class=\"hljs-keyword\">var<\/span>\/lib\/isso  \nchown isso:isso \/<span class=\"hljs-keyword\">var<\/span>\/lib\/isso -R  \n<\/code><\/pre>\n<h2 id=\"4isso\"><span id=\"h-4isso\"><\/span>4\u3001\u914d\u7f6e Isso<\/h2>\n<p>\u65b0\u5efa\u7acb\u4e00\u4e2a conf \u6587\u4ef6\uff0c\u6bd4\u5982 <code>\/etc\/isso.conf<\/code> \u6f14\u793a\u5185\u5bb9\u5982\u4e0b<\/p>\n<pre class=\"hljs makefile\"><code>[general]\ndbpath = \/var\/lib\/isso\/comments.db  \nname = example  \nhost = http:\/\/example.com\/  \n       http:\/\/example.org\/\nnotify = smtp  \nlog-file =\n\n[server]\nlisten = http:\/\/localhost:8090\/\n\n[moderation]\nenabled = true  \npurge-after = 30d\n\n[smtp]\nusername = username@example.com  \npassword = password  \nhost = smtp.example.com  \nport = 587  \nsecurity = starttls  \nto = \u4f60\u7684\u90ae\u7bb1\u5730\u5740  \nfrom = <span class=\"hljs-string\">\"Isso Comment\"<\/span>&lt;username@example.com&gt;  \ntimeout = 10\n\n[markup]\noptions = strikethrough, superscript, autolink  \nallowed-elements =  \nallowed-attributes =\n\n[guard]\nenabled = true  \nratelimit = 3  \ndirect-reply = 3  \nreply-to-self = false  \nrequire-author = true  \nrequire-email = true\n\n[hash]\nsalt = Eech7co8Ohloopo9Ol6baimi  \nalgorithm = pbkdf2  \n<\/code><\/pre>\n<p>\u6309\u7167\u5b98\u65b9\u7684<a href=\"https:\/\/posativ.org\/isso\/docs\/configuration\/server\/\">\u914d\u7f6e\u6587\u4ef6<\/a>\uff0c\u6211\u4eec\u6765\u4e00\u6761\u4e00\u6761\u8bf4\u660e<\/p>\n<p><code>[general]<\/code> \u662f\u57fa\u672c\u914d\u7f6e\uff0c\u5fc5\u987b\u586b\u5199<\/p>\n<p><code>dbpath<\/code> \u5c31\u662f\u6570\u636e\u5e93\u6587\u4ef6\uff0c\u521a\u624d\u6211\u4eec\u5df2\u7ecf\u5efa\u7acb\u4e86 <code>\/var\/lib\/isso\/<\/code> \u76ee\u5f55\uff0c\u6240\u4ee5\u4ed6\u4f1a\u81ea\u52a8\u751f\u6210 *\u5fc5\u586b<\/p>\n<p><code>name<\/code> \u662f\u8fd9\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u540d\u5b57\uff0c\u5982\u679c\u672c\u5730\u53ea\u642d\u5efa\u4e00\u4e2a Isso \u7684\u8bdd\u53ef\u4ee5\u5ffd\u7565\uff0c\u642d\u5efa\u591a\u4e2a Isso \u7684\u8bdd\u9700\u8981\u8bbe\u7f6e *\u53ef\u9009<\/p>\n<p><code>host<\/code> \u662f\u4f60\u5f15\u7528 Isso \u7684 JS \u7684\u7f51\u7ad9\u5730\u5740\uff0c\u9700\u8981\u5199\u5168\uff0c\u5982\u679c\u6709\u591a\u4e2a\u7684\u8bdd\u5c31\u591a\u52a0\u51e0\u884c\uff0c\u53ea\u6709\u4e00\u4e2a\u57df\u540d\u7684\u8bdd\u7559\u4e0b\u4e00\u4e2a\u5373\u53ef *\u5fc5\u586b<\/p>\n<p><code>notify<\/code> \u8bc4\u8bba\u5ba1\u6838\u901a\u77e5\u65b9\u5f0f\uff0c\u5982\u679c\u4e0d\u5f00\u542f\u5ba1\u6838\u53ef\u4ee5\u4e0d\u8bbe\u7f6e\uff0c\u8bbe\u7f6e\u4e86 SMTP \u5c31\u9700\u8981\u5728\u4e0b\u9762\u7684 <code>[smtp]<\/code> \u8bbe\u7f6e\u90ae\u4ef6\u53d1\u9001\u65b9\u5f0f *\u53ef\u9009<\/p>\n<p><code>log-file<\/code> \u8bb0\u5f55\u65e5\u5fd7\uff0c\u540e\u7eed\u6211\u4eec\u4f1a\u63d0\u5230\uff0c\u4e00\u822c\u4e0d\u9700\u8981\u5f00\u542f<\/p>\n<p><code>[server]<\/code> \u672c\u5730\u670d\u52a1\u7aef\u8bbe\u7f6e<\/p>\n<p><code>listen<\/code> \u9700\u8981\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\uff0c\u8fd9\u91cc\u6211\u4eec\u7528 8090 \u4e3a\u4f8b<\/p>\n<p><code>[moderation]<\/code> \u662f\u5426\u5f00\u542f\u8bc4\u8bba\u5ba1\u6838\uff0c\u4e0d\u9700\u8981\u7684\u8bdd\u53ef\u4ee5\u5199 <code>enabled = false<\/code><\/p>\n<p><code>purge-after<\/code> \u6307\u5b9a\u591a\u5c11\u65f6\u95f4\u540e\u5220\u9664\u8fd8\u5728\u5ba1\u6838\u961f\u5217\u91cc\u7684\u8bc4\u8bba<\/p>\n<p><code>[markup]<\/code> \u662f <a href=\"http:\/\/misaka.61924.nl\/\">Misaka<\/a> Markdown \u63d2\u4ef6<\/p>\n<p><code>options<\/code> \u53ef\u9009 <code>strikethrough<\/code>, <code>superscript<\/code>, <code>autolink<\/code> \u6bd4\u5982\u4e0d\u9700\u8981\u81ea\u52a8\u52a0\u5165\u8d85\u94fe\u63a5\u53ef\u4ee5\u53bb\u6389 <code>autolink<\/code><\/p>\n<p><code>allowed-elements<\/code> \u8bc4\u8bba\u5f00\u542f HTML \u6807\u7b7e\uff0c\u9ed8\u8ba4\u5141\u8bb8\u7684\u6807\u7b7e\u6709 <code>a<\/code>, <code>blockquote<\/code>, <code>br<\/code>, <code>code<\/code>, <code>del<\/code>, <code>em<\/code>, <code>h1<\/code>, <code>h2<\/code>, <code>h3<\/code>, <code>h4<\/code>, <code>h5<\/code>, <code>h6<\/code>, <code>hr<\/code>, <code>ins<\/code>, <code>li<\/code>, <code>ol<\/code>, <code>p<\/code>, <code>pre<\/code>, <code>strong<\/code>, <code>table<\/code>, <code>tbody<\/code>, <code>td<\/code>, <code>th<\/code>, <code>thead<\/code> \u548c <code>ul<\/code> \u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u60c5\u51b5\u4fee\u6539<\/p>\n<p><code>allowed-attributes<\/code> \u8bc4\u8bba\u5f00\u542f HTML \u6807\u7b7e\u7684\u5c5e\u6027\uff0c\u9ed8\u8ba4\u53ea\u5141\u8bb8 <code>align<\/code> \u548c <code>href<\/code><\/p>\n<p><code>[smtp]<\/code> \u5ba1\u6838\u8bc4\u8bba\u53d1\u9001\u90ae\u4ef6\u901a\u77e5\u7684\u8bbe\u7f6e\uff0c\u5177\u4f53\u53ef\u4ee5\u54a8\u8be2\u4f60\u4f7f\u7528\u7684\u90ae\u4ef6\u670d\u52a1\uff0c\u6309\u670d\u52a1\u5546\u63d0\u4f9b\u7684\u914d\u7f6e\u586b\u5199\u5373\u53ef\uff0c\u4e0d\u518d\u8be6\u7ec6\u63cf\u8ff0<\/p>\n<p><code>[guard]<\/code> \u5f00\u542f\u8bc4\u8bba\u9632\u706b\u5899\uff0c\u5982\u4e0d\u9700\u8981\u53ef\u4ee5\u586b\u5199 <code>enabled = false<\/code><\/p>\n<p><code>ratelimit<\/code> \u6bcf\u4e2a\u8bbf\u5ba2\u4e00\u5206\u949f\u6700\u591a\u53ef\u4ee5\u8bc4\u8bba\u7684\u6b21\u6570<\/p>\n<p><code>direct-reply<\/code> \u8bc4\u8bba\u56de\u590d\u6b21\u6570<\/p>\n<p><code>reply-to-self<\/code> \u662f\u5426\u53ef\u4ee5\u56de\u590d\u81ea\u5df1\u7684\u8bc4\u8bba\uff0c\u9700\u8981\u914d\u5408 JS \u5f15\u7528\uff0c\u4e0b\u9762\u4f1a\u8bf4<\/p>\n<p><code>require-author<\/code> \u662f\u5426\u8981\u6c42\u5199\u540d\u5b57\uff0c\u9700\u8981\u914d\u5408 JS \u5f15\u7528\uff0c\u4e0b\u9762\u4f1a\u8bf4<\/p>\n<p><code>require-email<\/code> \u662f\u5426\u8981\u6c42\u5199 Email \u5730\u5740\uff0c\u9700\u8981\u914d\u5408 JS \u5f15\u7528\uff0c\u4e0b\u9762\u4f1a\u8bf4<\/p>\n<p><code>[hash]<\/code> \u52a0\u5bc6\u8bc4\u8bba\u7684\u8eab\u4efd\u65b9\u5f0f\uff0c\u5982 Email \u5730\u5740\uff0c\u6ca1\u6709\u7279\u6b8a\u9700\u6c42\u53ef\u4ee5\u5ffd\u7565<\/p>\n<p>\u8be6\u7ec6\u7684\u89e3\u91ca\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u7684<a href=\"https:\/\/posativ.org\/isso\/docs\/configuration\/server\/\">\u6587\u6863<\/a>\uff0c\u5982\u679c\u6ca1\u6709\u7279\u6b8a\u7684\u9700\u6c42\uff0c\u4e5f\u4e0d\u9700\u8981\u5ba1\u6838\u8bc4\u8bba\uff0c\u76f4\u63a5\u53ef\u4ee5\u4e0a\u4e00\u4efd\u6700\u7b80\u5355\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5982\u4e0b<\/p>\n<pre class=\"hljs ini\"><code><span class=\"hljs-section\">[general]<\/span>\n<span class=\"hljs-attr\">dbpath<\/span> = \/var\/lib\/isso\/comments.db  \n<span class=\"hljs-attr\">host<\/span> = http:\/\/example.com\/\n<span class=\"hljs-section\">\n[server]<\/span>\n<span class=\"hljs-attr\">listen<\/span> = http:\/\/localhost:<span class=\"hljs-number\">8090<\/span>\/\n<span class=\"hljs-section\">\n[moderation]<\/span>\n<span class=\"hljs-attr\">enabled<\/span> = <span class=\"hljs-literal\">false<\/span>  \n<\/code><\/pre>\n<p>\u4fdd\u5b58\u8fd9\u4e2a\u6587\u4ef6\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u542f\u52a8 Isso \u770b\u8f93\u51fa\u6d88\u606f\u662f\u5426\u6b63\u5e38<\/p>\n<pre class=\"hljs nginx\"><code><span class=\"hljs-attribute\">isso<\/span> -c \/etc\/isso.conf run  \n<\/code><\/pre>\n<p>\u6ca1\u6709\u62a5\u9519\u6d88\u606f\u5219\u8bf4\u660e\u4f60\u7684\u914d\u7f6e\u6587\u4ef6\u6728\u6709\u95ee\u9898\uff0c\u6309 <kbd>ctrl + c<\/kbd> \u505c\u6b62 Isso<\/p>\n<h2 id=\"5nginx\"><span id=\"h-5nginx\"><\/span>5\u3001\u5b89\u88c5 Nginx \u5e76\u914d\u7f6e<\/h2>\n<p>Ubuntu \u4e0b\u53ef\u4ee5\u7528 PPA\uff0c\u8be6\u89c1<a href=\"https:\/\/sb.sb\/ubuntu-server-16-04-install-nginx-php-mysql\/\">\u300aUbuntu Server 16.04.x (Xenial Xerus) \u5b89\u88c5 LEMP \/ LNMP \u6559\u7a0b\u300b<\/a><\/p>\n<p>Debian \u4e0b\u53ef\u4ee5\u7528 Dotdeb\uff0c\u8be6\u89c1<a href=\"https:\/\/sb.sb\/debian-8-jessie-dotdeb-install-nginx-php-mysql\/\">\u300aDebian 8.x \u201cjessie\u201d \u4f7f\u7528 Dotdeb \u5b89\u88c5\u6700\u65b0\u7248\u672c LEMP \/ LNMP\u300b<\/a><\/p>\n<p>\u7136\u540e\u5b89\u88c5 Nginx<\/p>\n<pre class=\"hljs cs\"><code class=\"language-bash\">apt-<span class=\"hljs-keyword\">get<\/span> install nginx  \n<\/code><\/pre>\n<p>Nginx \u914d\u7f6e\u6587\u4ef6\u4e3e\u4f8b\u5982\u4e0b\uff0c Isso \u4f1a\u53cd\u4ee3\u5728 <code>example.com\/isso<\/code> \u76ee\u5f55<\/p>\n<pre class=\"hljs nginx\"><code class=\"language-nginx\"><span class=\"hljs-section\">server<\/span> {  \n        <span class=\"hljs-attribute\">listen<\/span> <span class=\"hljs-number\">80<\/span>;\n        <span class=\"hljs-attribute\">listen<\/span> [::]:<span class=\"hljs-number\">80<\/span>;\n\n        <span class=\"hljs-attribute\">server_name<\/span> example.com;        \n\n        <span class=\"hljs-attribute\">location<\/span> \/isso {\n            <span class=\"hljs-attribute\">proxy_set_header<\/span> X-Forwarded-For <span class=\"hljs-variable\">$proxy_add_x_forwarded_for<\/span>;\n            <span class=\"hljs-attribute\">proxy_set_header<\/span> X-Script-Name \/isso;\n            <span class=\"hljs-attribute\">proxy_set_header<\/span> Host <span class=\"hljs-variable\">$host<\/span>;\n            <span class=\"hljs-attribute\">proxy_set_header<\/span> X-Forwarded-Proto <span class=\"hljs-variable\">$scheme<\/span>;\n            <span class=\"hljs-attribute\">proxy_pass<\/span> http:\/\/localhost:8090;\n        }\n}\n<\/code><\/pre>\n<p>\u68c0\u67e5 Nginx \u914d\u7f6e\u5e76\u91cd\u65b0\u52a0\u8f7d<\/p>\n<pre class=\"hljs nginx\"><code><span class=\"hljs-attribute\">nginx<\/span> -t  \nnginx -s reload  \n<\/code><\/pre>\n<h2 id=\"6supervisor\"><span id=\"h-6supervisor\"><\/span>6\u3001\u5b89\u88c5 Supervisor \u5e76\u914d\u7f6e<\/h2>\n<p><a href=\"http:\/\/supervisord.org\/\">Supervisor<\/a> \u662f\u4e00\u6b3e\u8fdb\u7a0b\u5b88\u62a4\u8f6f\u4ef6\uff0c\u76ee\u7684\u662f\u4fdd\u6301 Isso \u5728\u540e\u53f0\u8fd0\u884c<\/p>\n<p>\u56e0\u4e3a\u524d\u9762\u5df2\u7ecf\u5b89\u88c5\u4e86 pip\uff0c\u6240\u4ee5\u76f4\u63a5 pip \u5b89\u88c5\u5373\u53ef<\/p>\n<pre class=\"hljs nginx\"><code class=\"language-bash\"><span class=\"hljs-attribute\">pip<\/span> install supervisor  \n<\/code><\/pre>\n<p>\u751f\u6210\u4e00\u4efd <code>supervisord.conf<\/code> \u6211\u4eec\u4e3e\u4f8b\u653e\u5728 <code>\/etc\/supervisord.conf<\/code><\/p>\n<pre class=\"hljs nginx\"><code><span class=\"hljs-attribute\">echo_supervisord_conf<\/span> &gt; \/etc\/supervisord.conf  \n<\/code><\/pre>\n<p>\u4fee\u6539 <code>\/etc\/supervisord.conf<\/code> \u6587\u4ef6\uff0c\u5728\u6700\u540e\u9762\u52a0\u5165<\/p>\n<pre class=\"hljs ini\"><code><span class=\"hljs-section\">[program:isso]<\/span>\n<span class=\"hljs-attr\">command<\/span> = \/usr\/local\/bin\/isso -c \/etc\/isso.conf run  \n<span class=\"hljs-attr\">directory<\/span> = \/var\/lib\/isso  \n<span class=\"hljs-attr\">user<\/span> = isso  \n<span class=\"hljs-attr\">autostart<\/span> = <span class=\"hljs-literal\">true<\/span>  \n<span class=\"hljs-attr\">autorestart<\/span> = <span class=\"hljs-literal\">true<\/span>  \n<span class=\"hljs-attr\">stdout_logfile<\/span> = \/var\/log\/supervisor\/isso.log  \n<span class=\"hljs-attr\">stderr_logfile<\/span> = \/var\/log\/supervisor\/isso_error.log  \n<span class=\"hljs-attr\">environment<\/span> = LANG=<span class=\"hljs-string\">\"en_US.UTF-8\"<\/span>  \n<\/code><\/pre>\n<p>\u751f\u6210\u65e5\u5fd7\u76ee\u5f55<\/p>\n<pre class=\"hljs perl\"><code class=\"language-bash\"><span class=\"hljs-keyword\">mkdir<\/span> -p \/var\/<span class=\"hljs-keyword\">log<\/span>\/supervisor  \n<\/code><\/pre>\n<p>\u7136\u540e\u542f\u52a8 Supervisor<\/p>\n<pre class=\"hljs nginx\"><code class=\"language-bash\"><span class=\"hljs-attribute\">supervisord<\/span> -c \/etc\/supervisord.conf  \n<\/code><\/pre>\n<p>\u5982\u679c\u6ca1\u6709\u62a5\u9519\uff0c\u5219\u53ef\u4ee5\u6d4b\u8bd5 Isso \u662f\u5426\u6b63\u786e\u8fd0\u884c<\/p>\n<pre class=\"hljs nginx\"><code class=\"language-bash\"><span class=\"hljs-attribute\">curl<\/span> http:\/\/example.com\/isso\/  \n<\/code><\/pre>\n<p>\u5982\u679c\u8fd4\u56de\u4e0b\u9762\u7ed3\u679c\uff0c\u5219\u4e00\u5207\u6b63\u5e38<\/p>\n<pre class=\"hljs xml\"><code class=\"language-bash\">root@example ~ # curl http:\/\/example.com\/isso\/  \n<span class=\"hljs-meta\">&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 3.2 Final\/\/EN\"&gt;<\/span>  \n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">title<\/span>&gt;<\/span>400 Bad Request<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">title<\/span>&gt;<\/span>  \n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span>&gt;<\/span>Bad Request<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>  \n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>missing uri query<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>  \n<\/code><\/pre>\n<p>\u5982\u679c\u8fd4\u56de\u7684\u662f <code>502 Bad Gateway<\/code> \u9519\u8bef\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u4ed4\u7ec6\u68c0\u67e5\u65e5\u5fd7 <code>\/var\/log\/supervisor\/isso_error.log<\/code> \u4ee5\u53ca\u6240\u6709\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u63a5\u7740\u628a Supervisor \u52a0\u5165\u5f00\u673a\u8fd0\u884c\uff0c\u7f16\u8f91 <code>\/etc\/rc.local<\/code> \u6587\u4ef6\uff0c\u5728 <code>exit 0<\/code> \u524d\u9762\u52a0\u5165\u4e00\u884c <code>supervisord -c \/etc\/supervisord.conf<\/code> \u5373\u53ef<\/p>\n<h2 id=\"7\"><span id=\"h-7\"><\/span>7\u3001\u5728\u7f51\u7ad9\u5f15\u7528\u8bc4\u8bba<\/h2>\n<p>\u6839\u636e<a href=\"https:\/\/posativ.org\/isso\/docs\/configuration\/client\/\">\u5b98\u65b9\u6587\u6863<\/a>\uff0c\u76f4\u63a5\u5f15\u7528\u4e00\u6bb5 JS \u5373\u53ef\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u9700\u6c42\u81ea\u884c\u8c03\u6574<\/p>\n<pre class=\"hljs xml\"><code class=\"language-html\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">data-isso<\/span>=<span class=\"hljs-string\">\"http:\/\/example.com\/isso\/\"<\/span>  \n        <span class=\"hljs-attr\">data-isso-css<\/span>=<span class=\"hljs-string\">\"true\"<\/span>\n        <span class=\"hljs-attr\">data-isso-lang<\/span>=<span class=\"hljs-string\">\"en\"<\/span>\n        <span class=\"hljs-attr\">data-isso-reply-to-self<\/span>=<span class=\"hljs-string\">\"false\"<\/span>\n        <span class=\"hljs-attr\">data-isso-require-author<\/span>=<span class=\"hljs-string\">\"false\"<\/span>\n        <span class=\"hljs-attr\">data-isso-require-email<\/span>=<span class=\"hljs-string\">\"false\"<\/span>\n        <span class=\"hljs-attr\">data-isso-max-comments-top<\/span>=<span class=\"hljs-string\">\"10\"<\/span>\n        <span class=\"hljs-attr\">data-isso-max-comments-nested<\/span>=<span class=\"hljs-string\">\"5\"<\/span>\n        <span class=\"hljs-attr\">data-isso-reveal-on-click<\/span>=<span class=\"hljs-string\">\"5\"<\/span>\n        <span class=\"hljs-attr\">data-isso-avatar<\/span>=<span class=\"hljs-string\">\"true\"<\/span>\n        <span class=\"hljs-attr\">data-isso-avatar-bg<\/span>=<span class=\"hljs-string\">\"#f0f0f0\"<\/span>\n        <span class=\"hljs-attr\">data-isso-avatar-fg<\/span>=<span class=\"hljs-string\">\"#9abf88 #5698c4 #e279a3 #9163b6 ...\"<\/span>\n        <span class=\"hljs-attr\">data-isso-vote<\/span>=<span class=\"hljs-string\">\"true\"<\/span>\n        <span class=\"hljs-attr\">data-vote-levels<\/span>=<span class=\"hljs-string\">\"\"<\/span>\n        <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"http:\/\/example.com\/isso\/js\/embed.js\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/pre>\n<p><code>data-isso<\/code> Isso \u5b89\u88c5\u7684 URI<\/p>\n<p><code>data-isso-css<\/code> \u4f7f\u7528\u9ed8\u8ba4\u7684 CSS \u5982\u679c\u9700\u8981\u81ea\u5df1\u6539 CSS \u5219\u8bbe\u7f6e\u6210 <code>false<\/code><\/p>\n<p><code>data-isso-lang<\/code> \u9ed8\u8ba4\u8bed\u8a00\uff0c\u53c2\u8003 <a href=\"https:\/\/zh.wikipedia.org\/wiki\/ISO_639-1\">ISO 639-1<\/a> \u7f16\u7801\uff0c\u53ef\u9009\u8bed\u8a00\u5217\u8868\u5728<a href=\"https:\/\/github.com\/posativ\/isso\/tree\/master\/isso\/js\/app\/i18n\">\u8fd9\u513f<\/a><\/p>\n<p><code>data-isso-reply-to-self<\/code>\uff0c<code>data-isso-require-author<\/code>\uff0c<code>data-isso-require-email<\/code> \u9700\u6309\u7167 Isso \u914d\u7f6e\u6587\u4ef6\u6765\uff0c\u8bf7\u4fdd\u6301\u4e00\u81f4<\/p>\n<p><code>data-isso-max-comments-top<\/code> \u4e00\u9875\u663e\u793a\u7684\u8bc4\u8bba\u6570<\/p>\n<p><code>data-isso-max-comments-nested<\/code> \u6700\u591a\u5d4c\u5957\u8bc4\u8bba\u6570<\/p>\n<p><code>data-isso-reveal-on-click<\/code> \u8d85\u51fa\u8bc4\u8bba\u6570\u540e\u70b9\u51fb\u663e\u793a\u7684\u8bc4\u8bba\u6570<\/p>\n<p><code>data-isso-avatar<\/code> \u663e\u793a\u5934\u50cf<\/p>\n<p><code>data-isso-avatar-bg<\/code> \u5934\u50cf\u80cc\u666f<\/p>\n<p><code>data-isso-avatar-fg<\/code> \u5934\u50cf\u989c\u8272<\/p>\n<p><code>data-isso-vote<\/code> \u5f00\u542f\u8bc4\u8bba\u7684\u652f\u6301\u548c\u53cd\u5bf9<\/p>\n<p><code>data-vote-levels<\/code> \u8bc4\u8bba\u652f\u6301\u548c\u53cd\u5bf9\u7684\u7b49\u7ea7\u7b97\u6cd5\uff0c\u5177\u4f53\u8bf7\u53c2\u8003\u5b98\u65b9\u7684\u6587\u6863<\/p>\n<p>\u5982\u679c\u6ca1\u6709\u7279\u6b8a\u9700\u6c42\uff0c\u76f4\u63a5\u6765\u4e00\u884c<\/p>\n<pre class=\"hljs xml\"><code class=\"language-html\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">data-isso<\/span>=<span class=\"hljs-string\">\"http:\/\/example.com\/isso\/\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"http:\/\/example.com\/isso\/js\/embed.min.js\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>  \n<\/code><\/pre>\n<p>\u63a5\u7740\u5728\u4f60\u7f51\u7ad9\u9002\u5f53\u7684\u4f4d\u7f6e\u52a0\u5165\u4e00\u4e2a <code>section<\/code> \u6807\u7b7e\u5373\u53ef<\/p>\n<pre class=\"hljs xml\"><code class=\"language-html\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">section<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"isso-thread\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">section<\/span>&gt;<\/span>  \n<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u7f51\u7ad9\u6709\u591a\u4e2a\u57df\u540d\uff0c\u53ef\u4ee5\u56fa\u5b9a\u5f53\u524d\u9875\u9762\u7684 URI \u548c\u6807\u9898\uff0c\u5f88\u9002\u5408 WordPress \u7b49\u7a0b\u5e8f\u7684\u7528\u6237\uff0c\u53ea\u6709\u4e00\u4e2a\u57df\u540d\u7684\u5ffd\u7565\u5373\u53ef<\/p>\n<pre class=\"hljs xml\"><code class=\"language-html\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">section<\/span> <span class=\"hljs-attr\">data-title<\/span>=<span class=\"hljs-string\">\"\u5f53\u524d\u6807\u9898\"<\/span> <span class=\"hljs-attr\">data-isso-id<\/span>=<span class=\"hljs-string\">\"\u5f53\u524dURI\"<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"isso-thread\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">section<\/span>&gt;<\/span>  \n<\/code><\/pre>\n<p>\u597d\u4e86\uff0c\u5927\u529f\u544a\u6210\uff0c\u5177\u4f53\u6f14\u793a\u53ef\u4ee5\u770b\u672c\u6587\u7684\u8bc4\u8bba<\/p>\n<p>\u672c\u6587\u8f6c\u8f7d\uff1a<strong>Showfom<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u67d0\u8bf4\u8981\u5173\u95ed\uff0c\u67d0\u8a00\u5bf9 HTTPS \u652f\u6301\u4e0d\u53cb\u597d\uff0c\u67d0\u6613\u5fc5\u987b\u767b\u9646\u624d\u53ef\u4ee5\u4e14\u5728\u56fd\u5916\u8bbf\u95ee\u5361\u51fa\u7fd4\uff0c\u5269\u4e0b\u56fd\u4ea7\u7684\u670d\u52a1\u90fd\u4e00\u822c\uff0c\u800c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-aside","hentry","category-lifestyle","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myya.net\/index.php\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}