{"id":613,"date":"2025-06-22T23:25:04","date_gmt":"2025-06-22T14:25:04","guid":{"rendered":"https:\/\/nonoi-jp.com\/?p=613"},"modified":"2025-06-22T23:51:35","modified_gmt":"2025-06-22T14:51:35","slug":"%e3%82%af%e3%83%a9%e3%82%a6%e3%83%89%e3%81%ab%e9%a0%bc%e3%82%89%e3%81%aa%e3%81%84%ef%bc%81%e3%82%aa%e3%83%b3%e3%83%97%e3%83%acai%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92iis-x-docker-x-fa","status":"publish","type":"post","link":"https:\/\/nonoi-jp.com\/?p=613","title":{"rendered":"\u30af\u30e9\u30a6\u30c9\u306b\u983c\u3089\u306a\u3044\uff01\u30aa\u30f3\u30d7\u30ecAI\u30b5\u30fc\u30d0\u30fc\u3092IIS \u00d7 Docker \u00d7 FastAPI\u3067\u69cb\u7bc9\u3057\u3066\u307f\u305f\u3010Windows\u30b5\u30fc\u30d0\u30fc\u69cb\u6210\u4f8b\u3011"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u306f\u3058\u3081\u306b\uff1aAI\u30b5\u30fc\u30d3\u30b9\u5c0e\u5165\u306b\u304a\u3051\u308b\u8ab2\u984c\u3068\u89e3\u6c7a\u7b56<\/h2>\n\n\n\n<p>AI\u3092\u696d\u52d9\u3067\u6d3b\u7528\u3057\u3088\u3046\u3068\u601d\u3063\u305f\u3068\u304d\u3001<strong>\u300c\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308c\u3070\u3059\u3050\u306b\u4f7f\u3048\u308b\u300d<\/strong>\u3068\u3044\u3046\u624b\u8efd\u3055\u306f\u9b45\u529b\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u305d\u306e\u88cf\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u8ab2\u984c\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"c-box c-box--bgGray\">\n  <div class=\"c-box__inner\">\n    <p><strong>\u3088\u304f\u3042\u308b\u8ab2\u984c<\/strong><\/p>\n    <ul>\n      <li>\u30af\u30e9\u30a6\u30c9AI\u306e<strong>\u6708\u984d\u8ab2\u91d1\u3084\u5f93\u91cf\u8ab2\u91d1\u306b\u3088\u308b\u30e9\u30f3\u30cb\u30f3\u30b0\u30b3\u30b9\u30c8\u5897\u5927<\/strong><\/li>\n      <li>\u793e\u5185\u30c7\u30fc\u30bf\u3084\u753b\u50cf\u3092\u6271\u3046\u5834\u5408\u3001<strong>\u6a5f\u5bc6\u60c5\u5831\u304c\u5916\u90e8\u306b\u9001\u4fe1\u3055\u308c\u308b\u30ea\u30b9\u30af<\/strong><\/li>\n      <li>\u30aa\u30d5\u30e9\u30a4\u30f3\u74b0\u5883\u3084\u9589\u57df\u7db2\u3067\u306f<strong>\u30af\u30e9\u30a6\u30c9AI\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5236\u7d04<\/strong><\/li>\n    <\/ul>\n  <\/div>\n<\/div>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u8ab2\u984c\u3092\u89e3\u6d88\u3059\u308b\u306b\u306f\u3001<strong>\u81ea\u793e\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067AI\u3092\u7a3c\u50cd\uff08\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u904b\u7528\uff09<\/strong>\u3059\u308b\u69cb\u6210\u304c\u52b9\u679c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"c-box c-box--bgGreen\">\n  <div class=\"c-box__inner\">\n    <p><strong>\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u3067\u52d5\u304b\u3059\u3053\u3068\u3067\u5f97\u3089\u308c\u308b\u30e1\u30ea\u30c3\u30c8<\/strong><\/p>\n    <ul>\n      <li><strong>\u30af\u30e9\u30a6\u30c9\u8ab2\u91d1\u306a\u3057<\/strong>\u3001\u5b9a\u984d\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u904b\u7528\u30b3\u30b9\u30c8\u3067AI\u3092\u904b\u7528\u53ef\u80fd<\/li>\n      <li><strong>\u793e\u5185\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5185\u3067\u51e6\u7406\u304c\u5b8c\u7d50<\/strong>\u3059\u308b\u305f\u3081\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ea\u30b9\u30af\u3092\u6700\u5c0f\u5316<\/li>\n      <li><strong>\u81ea\u7531\u306b\u30e2\u30c7\u30eb\u3084\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/strong>\u3067\u304d\u308b\u67d4\u8edf\u6027<\/li>\n    <\/ul>\n  <\/div>\n<\/div>\n\n\n\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001\u305d\u3093\u306a\u30aa\u30f3\u30d7\u30ecAI\u306e\u4ee3\u8868\u4f8b\u3067\u3042\u308b <strong>FastAPI\uff08Docker\uff09\u4e0a\u306eAI\u30a8\u30f3\u30b8\u30f3<\/strong>\u3092\u3001<strong>IIS\u3067SSL\u7d42\u7aef\u3057\u3066\u5b89\u5168\u306b\u5916\u90e8\u516c\u958b\u3059\u308b\u624b\u9806<\/strong>\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u69cb\u6210\u30a4\u30e1\u30fc\u30b8<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Internet]\n   \u2193 HTTPS (443)\n&#91;IIS \u30b5\u30fc\u30d0\u30fc]\u3000\u203bSSL\u7d42\u7aef\n   \u2193 HTTP (localhost:8000)\n&#91;Docker\u4e0a\u306eFastAPI] \u203bAI API\u306a\u3069<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step1. SSL\u8a3c\u660e\u66f8\u3092IIS\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p><strong>Let\u2019s Encrypt<\/strong>\u3084<strong>\u4f01\u696d\u8a8d\u8a3cSSL<\/strong>\uff08RapidSSL\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u30b5\u30a4\u30f3\u306a\u3069\uff09\u3067\u53d6\u5f97\u3057\u305f\u8a3c\u660e\u66f8\uff08.pfx\uff09\u3092\u4ee5\u4e0b\u306e\u624b\u9806\u3067IIS\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>IIS\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3092\u958b\u304f<\/li>\n\n\n\n<li>\u5de6\u306e\u30b5\u30fc\u30d0\u30fc\u540d\u3092\u9078\u629e\u3057\u3001\u300c\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u300d\u3092\u30af\u30ea\u30c3\u30af<\/li>\n\n\n\n<li>\u53f3\u30da\u30a4\u30f3\u300c\u8a3c\u660e\u66f8\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u300d\u304b\u3089pfx\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step2. HTTPS\u30d0\u30a4\u30f3\u30c9\u8a2d\u5b9a<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5bfe\u8c61\u306eWeb\u30b5\u30a4\u30c8\u3092\u9078\u629e \u2192 \u300c\u30d0\u30a4\u30f3\u30c9\u306e\u7de8\u96c6\u300d<\/li>\n\n\n\n<li>\u30dd\u30fc\u30c8\u300c443\u300d\u3092\u8ffd\u52a0\u3057\u3001\u8a3c\u660e\u66f8\u3092\u9078\u629e<\/li>\n\n\n\n<li>\u300cSNI\u3092\u6709\u52b9\u306b\u3059\u308b\u300d\u306b\u30c1\u30a7\u30c3\u30af\uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff09<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step3. \u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u69cb\u6210\u306e\u305f\u3081\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u8ffd\u52a0<\/h2>\n\n\n\n<p>IIS\u3067FastAPI\u306b\u4e2d\u7d99\u3059\u308b\u306b\u306f\u4ee5\u4e0b2\u3064\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff1a<\/p>\n\n\n\n<p><strong>&#x25b6; Application Request Routing (ARR)<\/strong><br>\n<a href=\"https:\/\/www.iis.net\/downloads\/microsoft\/application-request-routing\" target=\"_blank\" rel=\"noopener\">https:\/\/www.iis.net\/downloads\/microsoft\/application-request-routing<\/a><\/p>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\uff1a  \n\u300cApplication Request Routing\u30ad\u30e3\u30c3\u30b7\u30e5\u300d\u2192\u300c\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30ad\u30b7\u8a2d\u5b9a\u300d\u2192\u300c\u30d7\u30ed\u30ad\u30b7\u3092\u6709\u52b9\u306b\u3059\u308b\u300d\u306b\u30c1\u30a7\u30c3\u30af<\/p>\n\n\n\n<p><strong>&#x25b6; URL Rewrite<\/strong><br>\n<a href=\"https:\/\/www.iis.net\/downloads\/microsoft\/url-rewrite\" target=\"_blank\" rel=\"noopener\">https:\/\/www.iis.net\/downloads\/microsoft\/url-rewrite<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step4. URL Rewrite\u3067FastAPI\u3078\u8ee2\u9001<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u300cURL Rewrite\u300d\u3092\u958b\u304f \u2192 \u300c\u30eb\u30fc\u30eb\u306e\u8ffd\u52a0\u300d\u2192\u300c\u7a7a\u767d\u306e\u30eb\u30fc\u30eb\u300d<\/li>\n\n\n\n<li>\u30eb\u30fc\u30eb\u540d\u3092\u5165\u529b\uff08\u4f8b\uff1aReverseProxyToFastAPI\uff09<\/li>\n\n\n\n<li>\u4e00\u81f4\u6761\u4ef6\uff1a<br>\u5165\u529b\uff1a{REQUEST_URI} \/ \u4e00\u81f4\uff1a.*<\/li>\n\n\n\n<li>\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u7a2e\u985e\uff1a\u66f8\u304d\u63db\u3048\uff08Rewrite\uff09<br>URL\uff1a<code>http:\/\/localhost:8000\/{R:1}<\/code><br>\u300c\u51e6\u7406\u3092\u505c\u6b62\u300d\u306b\u30c1\u30a7\u30c3\u30af<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step5. FastAPI\u30b5\u30fc\u30d0\u30fc\uff08Docker\uff09\u3092\u8d77\u52d5<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u3001\u4e8b\u524d\u306b\u69cb\u7bc9\u30fb\u8abf\u6574\u3055\u308c\u305f <strong>LLaVA\uff08Language-and-Vision Assistant\uff09\u30e2\u30c7\u30eb<\/strong> \u3092\u7d44\u307f\u8fbc\u3093\u3060 FastAPI \u30b5\u30fc\u30d0\u30fc\u3092 Docker \u30b3\u30f3\u30c6\u30ca\u3068\u3057\u3066\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d \\\n  --name llava-api \\\n  -p 8000:8000 \\\n  your-llava-image-name<\/code><\/pre>\n\n\n\n\n<p>FastAPI\u5074\u306f <code>0.0.0.0:8000<\/code> \u3067\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002IIS\u304b\u3089 <code>http:\/\/localhost:8000<\/code> \u306b\u63a5\u7d9a\u3067\u304d\u308b\u72b6\u614b\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n\n<h2 class=\"wp-block-heading\">Step6. WordPress\u304b\u3089\u306e\u9023\u643a\u4f8b<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>fetch('\/api\/llava', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application\/json' },\n  body: JSON.stringify({ prompt: \"\u3053\u3093\u306b\u3061\u306f\" })\n})\n.then(res =&gt; res.json())\n.then(data =&gt; {\n  console.log(data);\n});<\/code><\/pre>\n\n\n\n<p><strong>https:\/\/yourdomain.com\/api\/llava<\/strong> \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u3067\u3001IIS\u7d4c\u7531\u3067FastAPI\u30b5\u30fc\u30d0\u30fc\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8ee2\u9001\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u6ce8\u610f\u70b9<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>FastAPI\u3092 <code>localhost<\/code> \u9650\u5b9a\u3067\u30d0\u30a4\u30f3\u30c9\u3057\u3001\u5916\u90e8\u30a2\u30af\u30bb\u30b9\u4e0d\u53ef\u306b\u3059\u308b<\/li>\n\n\n\n<li>\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001IIS\u3067\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u30fbIP\u5236\u9650\u3092\u5c0e\u5165<\/li>\n\n\n\n<li>WordPress\u3068\u306eAPI\u9023\u643a\u6642\u306b\u306fCSRF\u3084\u8a8d\u8a3c\u5bfe\u7b56\u3092\u5c0e\u5165\uff08\u4f8b\uff1anonce\uff09<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>IIS\u3067SSL\u7d42\u7aef\u3057\u3001FastAPI\u3092Docker\u4e0a\u3067\u904b\u7528\u3059\u308b\u3053\u3068\u3067\u3001<strong>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u67d4\u8edf\u6027\u3092\u4e21\u7acb\u3057\u305f\u30aa\u30f3\u30d7\u30ecAI\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9<\/strong>\u304c\u624b\u8efd\u306b\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3068\u306e\u9023\u643a\u3082\u30b9\u30e0\u30fc\u30ba\u3067\u3001\u793e\u5185AI\u6d3b\u7528\u3092\u672c\u683c\u5316\u3055\u305b\u305f\u3044\u65b9\u306b\u304a\u3059\u3059\u3081\u306e\u69cb\u6210\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"c-box c-box--bgBlue u-mt-40 u-mb-40\">\n  <div class=\"c-box__inner\">\n    <h3>\u3054\u76f8\u8ac7\u30fb\u5c0e\u5165\u30b5\u30dd\u30fc\u30c8\u306f\u3053\u3061\u3089<\/h3>\n    <p>\u672c\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305f\u69cb\u6210\u3092\u5c0e\u5165\u3057\u305f\u3044\u3001\u307e\u305f\u306f\u81ea\u793e\u74b0\u5883\u306b\u5408\u308f\u305b\u305f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u3054\u5e0c\u671b\u306e\u65b9\u306f\u3001\u4ee5\u4e0b\u3088\u308a\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n    <div style=\"text-align:center; margin-top:20px;\">\n      <a href=\"\/contact\" class=\"c-btn c-btn--filled c-btn--blue\" style=\"padding: 12px 32px; font-size: 1.1em;\">\u304a\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\u3078<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b\uff1aAI\u30b5\u30fc\u30d3\u30b9\u5c0e\u5165\u306b\u304a\u3051\u308b\u8ab2\u984c\u3068\u89e3\u6c7a\u7b56 AI\u3092\u696d\u52d9\u3067\u6d3b\u7528\u3057\u3088\u3046\u3068\u601d\u3063\u305f\u3068\u304d\u3001\u300c\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308c\u3070\u3059\u3050\u306b\u4f7f\u3048\u308b\u300d\u3068\u3044\u3046\u624b\u8efd\u3055\u306f\u9b45\u529b\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u305d\u306e\u88cf\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u8ab2\u984c\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u8ab2\u984c\u3092\u89e3\u6d88\u3059\u308b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":"","_wp_rev_ctl_limit":""},"categories":[15,8],"tags":[18,16,17,20,19,21],"class_list":["post-613","post","type-post","status-publish","format-standard","hentry","category-ai","category-tech-blog","tag-docker","tag-fastapi","tag-iis","tag-20","tag-19","tag-ai"],"_links":{"self":[{"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=\/wp\/v2\/posts\/613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=613"}],"version-history":[{"count":4,"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions"}],"predecessor-version":[{"id":621,"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions\/621"}],"wp:attachment":[{"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nonoi-jp.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}