{"id":2384,"date":"2015-10-02T23:41:47","date_gmt":"2015-10-02T14:41:47","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=2384"},"modified":"2015-10-02T23:43:04","modified_gmt":"2015-10-02T14:43:04","slug":"nginx%e3%81%ae%e3%83%90%e3%83%bc%e3%83%81%e3%83%a3%e3%83%ab%e3%83%9b%e3%82%b9%e3%83%88%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=2384","title":{"rendered":"Nginx\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u8a2d\u5b9a"},"content":{"rendered":"<p>\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306e\u4f53\u7cfb\u7684\u306a\u8a18\u8ff0\u304c\u898b\u5f53\u305f\u3089\u306a\u304b\u3063\u305f\u3002<br \/>\n\u4e0b\u8a18\u306e\u8a2d\u5b9a\u65b9\u6cd5\u304c\u6b63\u5f53\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u306f\u4e0d\u660e\u3067\u3042\u308b\u304c\u4e00\u3064\u306e\u5b9a\u756a\u4f8b\u3068\u3057\u3066\u899a\u3048\u66f8\u304d\u3002<\/p>\n<h2>\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u914d\u7f6e\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210<\/h2>\n<p>\u3053\u308c\u306f\u7fd2\u6163\u7684\u306a\u65b9\u6cd5\u3089\u3057\u304f\u3001<code>sites-available<\/code>\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u5b9f\u4f53\u3092\u914d\u7f6e\u3057\u3066\u3001<code>sites-enabled<\/code>\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u5f35\u308b\u3089\u3057\u3044\u3002<br \/>\n\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u524a\u9664\u3059\u308b\u3053\u3068\u3067\u3001\u7c21\u5358\u306b\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u306e\u30b5\u30a4\u30c8\u3092\u9589\u9396\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n<p>[code lang=text]<br \/>\n$ mkdir \/etc\/nginx\/sites-available<br \/>\n$ mkdir \/etc\/nginx\/sites-enabled<br \/>\n[\/code]<\/p>\n<h2>sites-available\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u914d\u7f6e<\/h2>\n<h3>\/etc\/nginx\/sites-available\/virtualhost.com<\/h3>\n<p>[code lang=text]<br \/>\nserver {<br \/>\n    listen       80;<br \/>\n    server_name www.virtualhost.com;<br \/>\n    access_log  \/var\/log\/nginx\/virtualhost.com.access.log;<br \/>\n    location \/ {<br \/>\n        root   \/var\/www\/html\/virtualhost;<br \/>\n        index  index.html index.htm index.php;<br \/>\n    }<br \/>\n    location ~ \\.php$ {<br \/>\n        root           \/var\/www\/html\/virtualhost;<br \/>\n        fastcgi_pass   127.0.0.1:9000;<br \/>\n        fastcgi_index  index.php;<br \/>\n        fastcgi_param  SCRIPT_FILENAME \/var\/www\/html\/virtualhost$fastcgi_script_name;<br \/>\n        include        fastcgi_params;<br \/>\n    }<br \/>\n}<br \/>\n[\/code]<\/p>\n<p>[code lang=text]<br \/>\n$ cd \/etc\/nginx\/sites-enabled\/<br \/>\n$ ln -s \/etc\/nginx\/sites-available\/virtualhost.com virtualhost.com<br \/>\n[\/code]<\/p>\n<h2>\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u306e\u3042\u308bsites-enabled\u306b\u5bfe\u3057\u3066\u30a4\u30f3\u30af\u30eb\u30fc\u30c9<\/h2>\n<h3>\/etc\/nginx\/nginx.conf<\/h3>\n<p>[code lang=text]<br \/>\ninclude \/etc\/nginx\/sites-enabled\/*;<br \/>\n[\/code]<\/p>\n<p>Apache HTTP Server\u306b\u6bd4\u3079\u308b\u3068\u3001\u76f4\u611f\u7684\u306b\u3082\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u308f\u304b\u308a\u3084\u3059\u304f\u8a18\u8ff0\u3067\u304d\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306e\u4f53\u7cfb\u7684\u306a\u8a18\u8ff0\u304c\u898b\u5f53\u305f\u3089\u306a\u304b\u3063\u305f\u3002 \u4e0b\u8a18\u306e\u8a2d\u5b9a\u65b9\u6cd5\u304c\u6b63\u5f53\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u306f\u4e0d\u660e\u3067\u3042\u308b\u304c\u4e00\u3064\u306e\u5b9a\u756a\u4f8b\u3068\u3057\u3066\u899a\u3048\u66f8\u304d\u3002 \u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u914d\u7f6e\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210 \u3053\u308c\u306f\u7fd2\u6163\u7684\u306a\u65b9\u6cd5\u3089\u3057 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[5,58,4],"tags":[],"class_list":["post-2384","post","type-post","status-publish","format-standard","hentry","category-centos","category-nginx","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2384"}],"version-history":[{"count":2,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2384\/revisions"}],"predecessor-version":[{"id":2386,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2384\/revisions\/2386"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}