{"id":448,"date":"2026-08-15T20:06:21","date_gmt":"2026-08-15T11:06:21","guid":{"rendered":"https:\/\/blog.daichang.me\/?p=448"},"modified":"2026-08-15T20:07:43","modified_gmt":"2026-08-15T11:07:43","slug":"python-%e3%81%a7%e7%b0%a1%e6%98%93%e7%9a%84%e3%81%aa-web-%e3%82%b5%e3%83%bc%e3%83%90%e3%82%92%e7%ab%8b%e3%81%a1%e4%b8%8a%e3%81%92%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.daichang.me\/?p=448","title":{"rendered":"Python \u3067\u7c21\u6613\u7684\u306a Web \u30b5\u30fc\u30d0\u3092\u7acb\u3061\u4e0a\u3052\u308b"},"content":{"rendered":"<p>\u30a4\u30f3\u30c8\u30e9 NW \u5185\u306e\u30b5\u30fc\u30d0\u4e0a\u306e\u4f55\u3089\u304b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u305f\u3044\u3001\u3042\u308b\u3044\u306f\u624b\u5143\u306b\u6301\u3063\u3066\u304d\u305f\u3044\u6642\u306b\u7c21\u5358\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u3001\u3051\u3069 Apache \u3084 nginx \u3092\u5165\u308c\u308b\u307b\u3069\u3067\u306f\u306a\u3044\u3068\u3044\u3046\u6642\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059\uff08\u6c7a\u3057\u3066\u5916\u90e8\u516c\u958b\u7528\u9014\u3067\u306f\u306a\u3044\u3067\u3059\uff09\u3002<\/p>\n<p>\u4e00\u756a\u30b7\u30f3\u30d7\u30eb\u306a\u4f7f\u3044\u65b9\u304c <code>python3 -m http.server 8080<\/code> \u3067\u3001\u5b9f\u884c\u3059\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">% python3 -m http.server 8080\r\nServing HTTP on 0.0.0.0 port 8080 (http:\/\/0.0.0.0:8080\/) ...<\/pre>\n<p>\u3067\u3059\u3002<br \/>\n\u3053\u308c\u3067\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092 webroot \u3068\u3057\u3066 <code>http:\/\/0.0.0.0:8080\/<\/code> \u3067\u516c\u958b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<p>IPv6 \u3067\u516c\u958b\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u4e0b\u8a18\u3092<\/p>\n<pre class=\"lang:default decode:true\">% python3 -m http.server 8080 -b ::\r\nServing HTTP on :: port 8080 (http:\/\/[::]:8080\/) ...<\/pre>\n<p>IPv4 &amp; IPv6 \u306e Dual stack \u3067\u516c\u958b\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u4e0b\u8a18\u3092<\/p>\n<pre class=\"lang:default decode:true\">% python3 -m http.server 8080 -b 0.0.0.0 -b :: \r\nServing HTTP on :: port 8080 (http:\/\/[::]:8080\/) ...<\/pre>\n<p>\u305d\u308c\u305e\u308c\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3044\u308f\u3086\u308b High port \u3067\u3042\u308c\u3070\u4e0a\u8a18\u306e\u3088\u3046\u306b root \u6a29\u9650\u306f\u4e0d\u8981\u3067\u5b9f\u884c\u51fa\u6765\u307e\u3059\u3002<br \/>\nWell-known port \u3067\u5b9f\u884c\u3057\u305f\u3044\u5834\u5408\u306b\u306f root \u6a29\u9650\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4e00\u6642\u7684\u3067\u306f\u306a\u304f\u3001\u3042\u308b\u7a0b\u5ea6\u4f7f\u3044\u7d9a\u3051\u305f\u3044\u5834\u5408\u306b\u306f <code>nohup python3 -m http.server 8080 -b 0.0.0.0 -b :: &amp;<\/code> \u306e\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30c8\u30e9 NW \u5185\u306e\u30b5\u30fc\u30d0\u4e0a\u306e\u4f55\u3089\u304b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u305f\u3044\u3001\u3042\u308b\u3044\u306f\u624b\u5143\u306b\u6301\u3063\u3066\u304d\u305f\u3044\u6642\u306b\u7c21\u5358\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u3001\u3051\u3069 Apache \u3084 nginx \u3092\u5165\u308c\u308b\u307b\u3069\u3067\u306f\u306a\u3044\u3068\u3044\u3046\u6642\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059\uff08\u6c7a\u3057\u3066\u5916\u90e8\u516c\u958b\u7528\u9014\u3067\u306f\u306a\u3044\u3067\u3059\uff09 [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/blog.daichang.me\/?p=448\">\u7d9a\u304d\u3092\u8aad\u3080&#8230;<span class=\"screen-reader-text\"> from Python \u3067\u7c21\u6613\u7684\u306a Web \u30b5\u30fc\u30d0\u3092\u7acb\u3061\u4e0a\u3052\u308b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[14,16,35,25],"class_list":["post-448","post","type-post","status-publish","format-standard","hentry","category-daily-life","category-tech","tag-linux","tag-network","tag-python","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/blog.daichang.me\/index.php?rest_route=\/wp\/v2\/posts\/448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.daichang.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.daichang.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.daichang.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.daichang.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=448"}],"version-history":[{"count":5,"href":"https:\/\/blog.daichang.me\/index.php?rest_route=\/wp\/v2\/posts\/448\/revisions"}],"predecessor-version":[{"id":453,"href":"https:\/\/blog.daichang.me\/index.php?rest_route=\/wp\/v2\/posts\/448\/revisions\/453"}],"wp:attachment":[{"href":"https:\/\/blog.daichang.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.daichang.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.daichang.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}