{"id":9877,"date":"2019-02-05T13:22:34","date_gmt":"2019-02-05T04:22:34","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9877"},"modified":"2019-02-05T13:25:50","modified_gmt":"2019-02-05T04:25:50","slug":"homestead%e3%81%ae502-bad-gateway%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%ab%e5%af%be%e5%87%a6","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9877","title":{"rendered":"homestead\u306e502 Bad Gateway\u30a8\u30e9\u30fc\u306b\u5bfe\u51e6"},"content":{"rendered":"<p>Laravel\u3067\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u306e\u306b\u3001\u4eee\u60f3\u74b0\u5883\u3067Homestead\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u30b5\u30a4\u30c8\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u6700\u521d\u3060\u3051\u300c502 Bad Gateway\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u308b\u72b6\u6cc1\u306b\u906d\u9047\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3082\u3001\u305a\u3063\u3068\u8868\u793a\u3055\u308c\u308b\u308f\u3051\u3067\u306a\u304f\u3001\u4f55\u56de\u304b\u518d\u8aad\u8fbc\u3092\u3059\u308b\u3068\u89e3\u6d88\u3059\u308b\u3068\u3044\u3046\u8b0e\u306e\u72b6\u6cc1\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001nginx\u306e\u30a8\u30e9\u30fc\u30ed\u30b0\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u3002<\/p>\n<p>[error] 2276#2276: *472 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.10.1, server: homestead.test, request: &#8220;GET \/ HTTP\/1.1&#8221;, upstream: &#8220;fastcgi:\/\/unix:\/var\/run\/php\/php7.3-fpm.sock:&#8221;, host: &#8220;homestead.test&#8221;<\/p>\n<p>\u3053\u306e\u30a8\u30e9\u30fc\u3067\u5bfe\u51e6\u6cd5\u3092\u30b0\u30b0\u3063\u3066\u3044\u308d\u3044\u308d\u8abf\u3079\u3066\u3044\u305f\u3068\u3053\u308d\u3001\u5bfe\u51e6\u6cd5\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f<\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/54335705\/new-laravel-homestead-installation-502-bad-gateway-refresh-the-website\">New Laravel (Homestead) installation: 502 Bad Gateway &#8211; *Refresh* &#8211; the website is displayed correctly | stackoverflow<\/a><\/p>\n<p>\u4ee5\u4e0b\u306e\u901a\u308a\u306b\u3059\u308b\u3053\u3068\u3067\u6cbb\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\/etc\/php\/7.3\/mods-available\/xdebug.ini\u3092\u7de8\u96c6\u3057\u307e\u3059<\/p>\n<p>sudo vim \/etc\/php\/7.3\/mods-available\/xdebug.ini<\/p>\n<p>\u4e0a\u8a18\u30d5\u30a1\u30a4\u30eb\u306e\u884c\u306e\u982d\u306b\u300c;\u300d\u3092\u5168\u3066\u3064\u3051\u3066\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>nginx\u3068\u3001php7.3-fpm\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059<\/p>\n<p>sudo service nginx restart<br \/>\nsudo service php7.3-fpm restart<\/p>\n<p>\u3053\u308c\u3067\u3001502 bad gateway\u306e\u30a8\u30e9\u30fc\u306f\u51fa\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>xdebug\u3068\u3044\u3046\u306e\u304c\u3001php\u306e\u30a8\u30e9\u30fc\u3092\u8a73\u7d30\u306b\u8ffd\u3044\u304b\u3051\u308b\u30c4\u30fc\u30eb\u3060\u305d\u3046\u3067\u3001\u305d\u308c\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u306e\u526f\u4f5c\u7528\u7684\u306a\u304b\u3093\u3058\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u4f55\u306b\u305b\u3088\u4e0a\u8a18\u3092\u7121\u52b9\u306b\u3059\u308b\u3053\u3068\u3067\u6cbb\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Laravel\u3067\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u306e\u306b\u3001\u4eee\u60f3\u74b0\u5883\u3067Homestead\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u30b5\u30a4\u30c8\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u6700\u521d\u3060\u3051\u300c502 Bad Gateway\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u308b\u72b6\u6cc1\u306b\u906d\u9047\u3057\u307e\u3057\u305f\u3002 \u3057\u304b\u3082\u3001\u305a\u3063\u3068\u8868\u793a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[140,131],"tags":[],"class_list":["post-9877","post","type-post","status-publish","format-standard","hentry","category-laravel","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9877"}],"version-history":[{"count":1,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9877\/revisions"}],"predecessor-version":[{"id":9878,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9877\/revisions\/9878"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}