{"id":360,"date":"2013-03-01T01:27:42","date_gmt":"2013-02-28T16:27:42","guid":{"rendered":"http:\/\/blog.tanitanin.net\/?p=360"},"modified":"2013-03-01T01:33:19","modified_gmt":"2013-02-28T16:33:19","slug":"nginx%e3%81%ae%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/blog.tanitanin.net\/?p=360","title":{"rendered":"nginx\u306e\u8a2d\u5b9a"},"content":{"rendered":"<p>\u3055\u304f\u3089VPS\u3067apache\u304b\u3089nginx\u3078\u79fb\u884c\u3057\u3088\u3046\u304b\u3068\u601d\u3063\u3066\u5165\u308c\u305f\u6642\u306e\u8a2d\u5b9a\u3092\u5fd8\u308c\u306a\u3044\u305f\u3081\u306e\u30e1\u30e2\uff0e<\/p>\n<p>\u307e\u305a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b\uff0cnginx\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30e6\u30fc\u30b6\u3092\u8a2d\u5b9a\u3059\u308b\uff0e<\/p>\n<pre class=\"brush:bash; ruler: false;\">\r\n$ sudo groupadd nginx\r\n$ sudo useradd -g nginx -s \/sbin\/nologin -d \/usr\/local\/nginx nginx \r\n<\/pre>\n<p>\u6b21\u306fnginx\u306e\u30bd\u30fc\u30b9\u3092<a href=\"http:\/\/nginx.org\/en\/download.html\" title=\"nginx\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\" target=\"_blank\">\u3053\u3053<\/a>\u304b\u3089\u843d\u3068\u3057\u3066\u304d\u3066\uff0c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff0e<\/p>\n<pre class=\"brush:bash; ruler: false;\">\r\n$ wget http:\/\/nginx.org\/download\/nginx-1.2.7.tar.gz\r\n$ tar xvf nginx-1.2.7\r\n$ cd nginx-1.2.7\r\n$ .\/configure --user=nginx --group=nginx --with-http_ssl_module --with_http-dav_module --with-mail --with-mail_ssl_module --with-http_realip_module\r\n$ make\r\n$ sudo make install\r\n<\/pre>\n<p>\u3053\u308c\u3067&#8217;\/usr\/local\/nginx&#8217;\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\uff0e<\/p>\n<p>\u6b21\u306b\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3059\u308b\uff0e<br \/>\n<a href=\"http:\/\/wiki.nginx.org\/RedHatNginxInitScript\" title=\"RedHatNginxInitScript\" target=\"_blank\">\u3053\u3053<\/a>\u306b\u3042\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092&#8221;\/etc\/init.d\/nginx&#8221;\u3068\u3057\u3066\u4fdd\u5b58\uff0e\u4ee5\u4e0b\u306e\u90e8\u5206\u3092\u66f8\u304d\u63db\u3048\u308b\uff0e<\/p>\n<pre class=\"brush:sh; ruler: false;\">\r\nnginx=\"\/usr\/local\/nginx\/sbin\/nginx\"\r\nNGINX_CONF_FILE=\"\/usr\/local\/nginx\/conf\/nginx.conf\"\r\n<\/pre>\n<p>\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u5b9f\u884c\u6a29\u9650\u3092\u4e0e\u3048\u308b\uff0e<\/p>\n<pre class=\"brush:sh; ruler: false;\">\r\n$ sudo chown root:root \/etc\/init.d\/nginx\r\n$ sudo chmod +x \/etc\/init.d\/nginx\r\n<\/pre>\n<p>\u6700\u5f8c\u306b\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068<\/p>\n<pre class=\"brush:sh; ruler: false;\">\r\n$ sudo service nginx start\r\nnginx \u3092\u8d77\u52d5\u4e2d:                                            [  OK  ]\r\n<\/pre>\n<p>OK\u3068\u51fa\u308b\uff0eNG\u306e\u5834\u5408\u306f\u6b63\u3057\u304f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u3066\u3044\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\uff0c\u3084\u308a\u76f4\u3057\uff0e<\/p>\n<p>\u8a2d\u5b9a\u306f&#8221;\/usr\/local\/nginx\/conf\/nginx.conf&#8221;\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\uff0e<\/p>\n<p>\u53c2\u8003\uff1a<br \/>\n<a href=\"http:\/\/abeerforyou.com\/?p=391\" title=\"Apache\u304b\u3089Nginx \u3078\u79fb\u884c\" target=\"_blank\">abeerforyou.com : Apache\u304b\u3089Nginx \u3078\u79fb\u884c<\/a><br \/>\n<a href=\"http:\/\/heartbeats.jp\/hbblog\/2012\/02\/nginx03.html\" title=\"\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2way - Powered by HEARTBEATS\">\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2way &#8211; Powered by HEARTBEATS : ginx\u9023\u8f093\u56de\u76ee: nginx\u306e\u8a2d\u5b9a\u3001\u305d\u306e1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u304f\u3089VPS\u3067apache\u304b\u3089nginx\u3078\u79fb\u884c\u3057\u3088\u3046\u304b\u3068\u601d\u3063\u3066\u5165\u308c\u305f\u6642\u306e\u8a2d\u5b9a\u3092\u5fd8\u308c\u306a\u3044\u305f\u3081\u306e\u30e1\u30e2\uff0e \u307e\u305a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b\uff0cnginx\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30e6\u30fc\u30b6\u3092\u8a2d\u5b9a\u3059\u308b\uff0e $ sudo groupadd nginx $  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[64],"tags":[],"class_list":["post-360","post","type-post","status-publish","format-standard","hentry","category-64"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5lSjy-5O","jetpack-related-posts":[{"id":371,"url":"https:\/\/blog.tanitanin.net\/?p=371","url_meta":{"origin":360,"position":0},"title":"Apache\u3092\u52d5\u304b\u3057\u306a\u304c\u3089nginx\u3092\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u306b\u8a2d\u5b9a\u3059\u308b\u30e1\u30e2","author":"tanitanin","date":"2013\u5e743\u67088\u65e5","format":false,"excerpt":"\u3059\u3067\u306bApache\u3067\u52d5\u304b\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\u3067\uff0cnginx\u306e\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e \u8a2d\u5b9a\u3092\u3057\u2026","rel":"","context":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","block_context":{"text":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","link":"https:\/\/blog.tanitanin.net\/?cat=64"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":387,"url":"https:\/\/blog.tanitanin.net\/?p=387","url_meta":{"origin":360,"position":1},"title":"Rails3\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092nginx+unicorn\u4e0a\u3067\u52d5\u304b\u3059\u30e1\u30e2","author":"tanitanin","date":"2013\u5e743\u67088\u65e5","format":false,"excerpt":"Rails\u3092nginx\u3068unicorn\u3067\u52d5\u304b\u3059\u3068\u901f\u3044\u3068\u3044\u3046\u30a6\u30ef\u30b5\u3092\u8033\u306b\u3057\u305f\u306e\u3067\uff0c\u3055\u3063\u305d\u304f\u3084\u3063\u3066\u307f\u308b\u3053\u2026","rel":"","context":"Rails","block_context":{"text":"Rails","link":"https:\/\/blog.tanitanin.net\/?cat=73"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":713,"url":"https:\/\/blog.tanitanin.net\/?p=713","url_meta":{"origin":360,"position":2},"title":"\u3055\u304f\u3089VPS\u306b CentOS 7 \u3092\u5165\u308c\u307e\u3057\u305f","author":"tanitanin","date":"2014\u5e7411\u670816\u65e5","format":false,"excerpt":"CentOS 6 \u3067\u904b\u7528\u3057\u3066\u3044\u305f tanitanin.net \u3067\u3059\u304c\uff0c\u6570\u65e5\u524d\uff0c\u666e\u6bb5ssh\u3067\u4f7f\u3063\u3066\u3044\u308b\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":762,"url":"https:\/\/blog.tanitanin.net\/?p=762","url_meta":{"origin":360,"position":3},"title":"Gitit \u3092 systemd \u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u8d77\u52d5\u3059\u308b","author":"tanitanin","date":"2014\u5e7411\u670818\u65e5","format":false,"excerpt":"\u3055\u304f\u3089VPS\u306eOS\u3092CentOS7\u306b\u3057\u305f\u306e\u3067\uff0cWiki\u3082\u65b0\u3057\u304f\u3057\u3088\u3046\u3068\u601d\u3044Gitit\u3092\u52d5\u304b\u3057\u59cb\u3081\u307e\u3057\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":80,"url":"https:\/\/blog.tanitanin.net\/?p=80","url_meta":{"origin":360,"position":4},"title":"MeCab\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f","author":"tanitanin","date":"2010\u5e7410\u670814\u65e5","format":false,"excerpt":"\u3064\u3044\u306bUbuntu\u306bMeCab\u304c\u5165\u308a\u307e\u3057\u305f\u3088\u30fc \u3068\u3044\u3046\u308f\u3051\u3067\u30e1\u30e2\u30e1\u30e2 \u3053\u3053\u304c\u53c2\u8003\u306b\u306a\u308b\u3088\u3063\u3068 \u307e\u305a\u3001\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":847,"url":"https:\/\/blog.tanitanin.net\/?p=847","url_meta":{"origin":360,"position":5},"title":"CentOS 7 \u306b Play Framework 2.3 \u3092\u5165\u308c\u308b","author":"tanitanin","date":"2015\u5e742\u670815\u65e5","format":false,"excerpt":"Scala\u3067Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308b\u306e\u306b\u3088\u304f\u7528\u3044\u3089\u308c\u308b\u3089\u3057\u3044\uff0cPlay\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u2026","rel":"","context":"\u672a\u5206\u985e","block_context":{"text":"\u672a\u5206\u985e","link":"https:\/\/blog.tanitanin.net\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts\/360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360"}],"version-history":[{"count":10,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions"}],"predecessor-version":[{"id":370,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions\/370"}],"wp:attachment":[{"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tanitanin.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}