{"id":5103,"date":"2022-03-19T15:39:09","date_gmt":"2022-03-19T06:39:09","guid":{"rendered":"https:\/\/suzutukiblog.com\/?p=5103"},"modified":"2022-03-19T15:55:28","modified_gmt":"2022-03-19T06:55:28","slug":"portfolio","status":"publish","type":"post","link":"https:\/\/suzutukiblog.com\/index.php\/2022\/03\/19\/portfolio\/","title":{"rendered":"\u30dd\u30fc\u30c8\u30d5\u30a9\u30ea\u30aa\u306e\u4fee\u6b63\u306e\u4ed5\u65b9(AWS\uff0bRails)"},"content":{"rendered":"<h3>\u30dd\u30fc\u30c8\u30d5\u30a9\u30ea\u30aa\u3067\u4fee\u6b63\u3084\u8ffd\u52a0\u3059\u308b\u6642\u306b\u898b\u308b(\u81ea\u5206\u7528)<\/h3>\n<h3 class=\"p3\"><b>Nginx\u304c\u304a\u304b\u3057\u3044\u6642\u306b\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/b><\/h3>\n<pre class=\"p3\"><strong>curl -IXGET http:\/\/IP\u30a2\u30c9\u30ec\u30b9<\/strong><\/pre>\n<h3>\u6b63\u5e38\u306e\u5834\u5408\u3053\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/h3>\n<pre><strong>HTTP\/1.1 200 OK<\/strong>\r\nServer: nginx\/1.20.0\r\nDate: Sat, 19 Mar 2022 06:41:17 GMT\r\nContent-Type: text\/html; charset=utf-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nX-Frame-Options: SAMEORIGIN\r\nX-XSS-Protection: 1; mode=block\r\nX-Content-Type-Options: nosniff\r\nX-Download-Options: noopen\r\nX-Permitted-Cross-Domain-Policies: none\r\nReferrer-Policy: strict-origin-when-cross-origin\r\nETag: W\/\"919d450b157b488f0\"\r\nCache-Control: max-age=0, private, must-revalidate\r\nSet-Cookie: _todo_session=b2\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0aR5Sy9mhX1RV1dWR01Hek1aR2JWcDNRPT0tLVdrNnp5dlhtaEFKRzBjUlhpMHhXbUE9PQ%3D%3D--cf3f8a4eaa2c6c53fc7b2f73f97a5cc2e9b7edcf; path=\/; HttpOnly\r\nX-Request-Id: 0de84a21-\uff0a\uff0a\uff0a\uff0a-\uff0a\uff0a\uff0a\uff0a-\uff0a\uff0a\uff0a\uff0a-c4e2d\r\nX-Runtime: 0.004671<\/pre>\n<h3>nginx\u306e\u30a8\u30e9\u30fc\u30ed\u30b0\u3092\u898b\u308b\u3068\u304d\u306f<\/h3>\n<pre class=\"p3\"><b>sudo less \/var\/log\/nginx\/error.log<\/b><\/pre>\n<h3 class=\"p3\">nginx\u306e\u8a2d\u5b9a\u5909\u66f4\u3059\u308b\u306b\u306f<\/h3>\n<pre class=\"p3\">sudo vi \/etc\/nginx\/nginx.conf\r\n\r\ncd \/etc\/nginx\/conf.d\/\r\n\r\nsudo vim \u30a2\u30d7\u30ea\u540d.conf\r\n\r\nsudo vi etc\/nginx\/conf.d\/\u30a2\u30d7\u30ea\u540d.conf\r\n\r\n#\u518d\u8d77\u52d5\u3057\u3066\u8a2d\u5b9a\u3092\u53cd\u6620\u3059\u308b\u30b3\u30de\u30f3\u30c9\r\n\r\nsudo nginx -s reload<\/pre>\n<p class=\"p3\"><b>nginx\u306e\u30d7\u30ed\u30bb\u30b9id\u3092\u898b\u308b\u306b\u306f<\/b><\/p>\n<pre class=\"p3\"><b>sudo lsof -i | grep nginx<\/b><\/pre>\n<p class=\"p3\"><b>\u30a2\u30d7\u30ea\u306e\u30a8\u30e9\u30fc\u30ed\u30b0\u3092\u898b\u308b\u306b\u306f<\/b><\/p>\n<pre class=\"p3\">sudo less \/var\/www\/\u30a2\u30d7\u30ea\u540d\/log\/nginx.error.log<\/pre>\n<h3 class=\"p3\">EC2\u306b\u63a5\u7d9a\u3057\u305f\u3089\u30a2\u30d7\u30ea\u76f4\u4e0b\u306b\u79fb\u52d5<\/h3>\n<pre class=\"p3\"><strong>cd \/var\/www\/\u30a2\u30d7\u30ea\u540d\/<\/strong><\/pre>\n<p><strong>nginx\u3092\u518d\u8d77\u52d5\u3059\u308b\u306b\u306f<\/strong><\/p>\n<pre class=\"p3\">sudo service nginx restart<\/pre>\n<h3 class=\"p3\">puma\u3092\u505c\u6b62\u3059\u308b\u306b\u306f<\/h3>\n<pre class=\"p3\">bundle exec pumactl stop<\/pre>\n<h3 class=\"p3\">puma\u3092\u8d77\u52d5\u3059\u308b\u306b\u306f<\/h3>\n<pre class=\"p3\">bundle exec pumactl start<\/pre>\n<h3 class=\"p3\">Puma\u306e\u8a2d\u5b9a\u5909\u66f4\u3059\u308b\u306b\u306f<\/h3>\n<pre class=\"p3\">vim \/var\/www\/\u30a2\u30d7\u30ea\u540d\/config\/puma.rb<\/pre>\n<h3 class=\"p1\"><b>\u2461\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u304b\u3089<\/b>JS\u3084SCSS\u3092\u76f4\u3057\u305f\u5f8c\u306b\u3059\u308b\u3053\u3068<\/h3>\n<p class=\"p3\">\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u306b\u306f<\/p>\n<pre class=\"p3\">bundle exec rake assets:precompile RAILS_ENV=production<\/pre>\n<h3 class=\"p3\">Puma\u3092\u518d\u8d77\u52d5\u3059\u308b<\/h3>\n<pre class=\"p3\">bundle exec pumactl stop\r\n\r\nbundle exec pumactl start<\/pre>\n<h3>Puma\u3092\u8d77\u52d5\u3059\u308b\u30b3\u30de\u30f3\u30c9\/var\/www\/\u30a2\u30d7\u30ea\u540d\/config\/puma\/production\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u5834\u5408<\/h3>\n<pre class=\"p3\">bundle exec rails s -e production<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30dd\u30fc\u30c8\u30d5\u30a9\u30ea\u30aa\u3067\u4fee\u6b63\u3084\u8ffd\u52a0\u3059\u308b\u6642\u306b\u898b\u308b(\u81ea\u5206\u7528) Nginx\u304c\u304a\u304b\u3057\u3044\u6642\u306b\u3059\u308b\u30b3\u30de\u30f3\u30c9 curl -IXGET http:\/\/IP\u30a2\u30c9\u30ec\u30b9 \u6b63\u5e38\u306e\u5834\u5408\u3053\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002 HTTP\/1.1 200 OK Server [&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,"footnotes":""},"categories":[30,27,13],"tags":[],"class_list":["post-5103","post","type-post","status-publish","format-standard","hentry","category-aws","category-programming-note","category-rails"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/5103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=5103"}],"version-history":[{"count":4,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/5103\/revisions"}],"predecessor-version":[{"id":5107,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/5103\/revisions\/5107"}],"wp:attachment":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=5103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=5103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=5103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}