<br />
<b>Warning</b>:  Use of undefined constant WP_ALLOW_REPAIR - assumed 'WP_ALLOW_REPAIR' (this will throw an Error in a future version of PHP) in <b>/var/www/wordpress/wp-config.php</b> on line <b>17</b><br />
{"id":876,"date":"2017-05-05T07:00:41","date_gmt":"2017-05-05T07:00:41","guid":{"rendered":"https:\/\/peloo.net\/?p=876"},"modified":"2017-12-05T15:25:25","modified_gmt":"2017-12-05T15:25:25","slug":"nginx%e4%bb%a3%e7%90%86jira","status":"publish","type":"post","link":"https:\/\/peloo.net\/?p=876","title":{"rendered":"Nginx\u4ee3\u7406Jira"},"content":{"rendered":"<p>\n\tJira\uff08\u654f\u6377\u9879\u76ee\u7ba1\u7406\u7cfb\u7edf\uff09\u5b89\u88c5\u5b8c\u6bd5\u540e\uff0c\u9ed8\u8ba4\u662f\u4e2atomcat\u670d\u52a1\u5668\uff0c\u5bf9\u5916\u7684\u670d\u52a1\u7aef\u53e3\u662f8080\uff0c\u7528\u6237\u8bbf\u95ee\u3001\u673a\u5668\u6027\u80fd\u90fd\u4e0d\u592a\u597d\uff0c\u6240\u4ee5\u5efa\u8bae\u641e\u4e2anginx\u505a\u524d\u7aef\u4ee3\u7406\u3002\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t1&nbsp; \u5b89\u88c5OpenResty\n<\/p>\n<p>\n\t\u76ee\u524dopenresty\u7ecf\u8fc7\u6539\u9020\uff0c\u6bd4nginx\u66f4\u52a0\u5f3a\u5927\uff0c OpenResty<sup>&reg;<\/sup> \u662f\u4e00\u4e2a\u57fa\u4e8e <a href=\"https:\/\/openresty.org\/cn\/nginx.html\">Nginx<\/a> \u4e0e Lua \u7684\u9ad8\u6027\u80fd Web \u5e73\u53f0\uff0c\u5176\u5185\u90e8\u96c6\u6210\u4e86\u5927\u91cf\u7cbe\u826f\u7684 Lua \u5e93\u3001\u7b2c\u4e09\u65b9\u6a21\u5757\u4ee5\u53ca\u5927\u591a\u6570\u7684\u4f9d\u8d56\u9879\u3002 \u6b64\u5904\u6211\u4eec\u4ee5root\u7528\u6237\u6765\u7f16\u8bd1\u5b89\u88c5openresty\n<\/p>\n<pre>\r\n<font face=\"\u9ed1\u4f53\">yum -y install readline-devel pcre-devel openssl-devel gcc\r\nwget -c -P \/tmp https:\/\/openresty.org\/download\/openresty-1.9.7.5.tar.gz\r\ncd \/tmp\r\ntar xvf \/tmp\/openresty-1.9.7.5.tar.gz\r\ncd openresty-1.9.7.5\r\n.\/configure --prefix=\/opt\/openresty \\\r\n            --with-luajit \\\r\n            --without-http_redis2_module \\\r\n            --with-http_iconv_module\r\nmake &amp;&amp; make install<\/font><\/pre>\n<pre>\r\n<font face=\"\u9ed1\u4f53\">groupadd nginx\r\nuseradd -s \/sbin\/nologin -M -g nginx nginx\r\nmkdir -p \/var\/log\/nginx<\/font><\/pre>\n<p>\n\t2&nbsp; \u914d\u7f6eserver\u90e8\u5206\n<\/p>\n<p>\n\tserver\u90e8\u5206\u7684\u914d\u7f6e\u5982\u4e0b\uff0c\u8bf7\u81ea\u884c\u6dfb\u52a0\u5230nginx\u76f8\u5173\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002\n<\/p>\n<div>\n\t<font face=\"\u9ed1\u4f53\">server {&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen 80;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server_name xxx.xxx.xxx.xxx;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; access_log \/var\/log\/nginx\/access.log;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error_log \/var\/log\/nginx\/error.log;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #root html;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #index index.html index.htm index.php;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port_in_redirect off;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location ~* ^.+\/.(jpg|jpeg|gif|png|swf|rar|zip|css|js)$ {&nbsp; ##static file&nbsp;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite ^(.*) http:\/\/xxx.xxx.xxx.xxx:8080\/$1;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location \/ {&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_pass http:\/\/xxx.xxx.xxx.xxx:8080;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_redirect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; off;&nbsp;&nbsp;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Host $host:$server_port;&nbsp;&nbsp; ##\u91cd\u70b9\u5728$server_port&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X-Real-IP $remote_addr;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X-Forwarded-For $proxy_add_x_forwarded_for;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_max_temp_file_size 0;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_connect_timeout 90;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_send_timeout 90;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_read_timeout 90;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_buffer_size 4k;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_buffers 4 32k;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_busy_buffers_size 64k;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_hide_header Vary;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header Accept-Encoding &#039;&#039;;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header Referer $http_referer;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header Cookie $http_cookie;&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<\/font>\n<\/div>\n<div>\n\t<font face=\"\u9ed1\u4f53\">&nbsp;&nbsp;&nbsp; } &nbsp;<\/font>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Jira\uff08\u654f\u6377\u9879\u76ee\u7ba1\u7406\u7cfb\u7edf\uff09\u5b89\u88c5\u5b8c\u6bd5\u540e\uff0c\u9ed8\u8ba4\u662f\u4e2atomcat\u670d\u52a1\u5668\uff0c\u5bf9\u5916\u7684\u670d\u52a1\u7aef\u53e3\u662f8080\uff0c\u7528\u6237\u8bbf\u95ee\u3001\u673a\u5668\u6027\u80fd\u90fd\u4e0d\u592a\u597d\uff0c\u6240\u4ee5\u5efa\u8bae\u641e\u4e2anginx\u505a\u524d\u7aef\u4ee3\u7406\u3002 &nbsp; 1&nbsp; \u5b89\u88c5OpenResty \u76ee\u524dopenresty\u7ecf\u8fc7\u6539\u9020\uff0c\u6bd4nginx\u66f4\u52a0\u5f3a\u5927\uff0c OpenResty&reg; \u662f\u4e00\u4e2a\u57fa\u4e8e Nginx \u4e0e Lua \u7684\u9ad8\u6027\u80fd Web \u5e73\u53f0\uff0c\u5176\u5185\u90e8\u96c6\u6210\u4e86\u5927\u91cf\u7cbe\u826f\u7684 Lua \u5e93\u3001\u7b2c\u4e09\u65b9\u6a21\u5757\u4ee5\u53ca\u5927\u591a\u6570\u7684\u4f9d\u8d56\u9879\u3002 \u6b64\u5904\u6211\u4eec\u4ee5root\u7528\u6237\u6765\u7f16\u8bd1\u5b89\u88c5openresty yum -y install readline-devel pcre-devel openssl-devel gcc wget -c -P \/tmp https:\/\/openresty.org\/download\/openresty-1.9.7.5.tar.gz cd \/tmp tar xvf \/tmp\/openresty-1.9.7.5.tar.gz cd openresty-1.9.7.5 .\/configure &#8211;prefix=\/opt\/openresty \\ &#8211;with-luajit \\ &#8211;without-http_redis2_module \\ &#8211;with-http_iconv_module make &amp;&amp; make install groupadd nginx useradd -s \/sbin\/nologin -M -g nginx&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-876","post","type-post","status-publish","format-standard","hentry","category-33"],"aioseo_notices":[],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=876"}],"version-history":[{"count":5,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/876\/revisions"}],"predecessor-version":[{"id":1057,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/876\/revisions\/1057"}],"wp:attachment":[{"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}