{"id":2555,"date":"2020-02-15T11:37:19","date_gmt":"2020-02-15T08:37:19","guid":{"rendered":"http:\/\/demensdeum.com\/blog\/?p=2555"},"modified":"2024-12-16T22:32:29","modified_gmt":"2024-12-16T19:32:29","slug":"cpp-fcgi","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/ja\/2020\/02\/15\/cpp-fcgi\/","title":{"rendered":"C++ FCGI \u3067\u306e\u30d0\u30c3\u30af\u30a8\u30f3\u30c9 \u30b5\u30fc\u30d0\u30fc\u306e\u4f5c\u6210"},"content":{"rendered":"<p>3D \u30a8\u30c7\u30a3\u30bf Cube Art Project \u306e\u30b5\u30fc\u30d0\u30fc\u90e8\u5206\u3092\u3069\u306e\u3088\u3046\u306b\u66f8\u3044\u305f\u304b\u306b\u3064\u3044\u3066\u306e\u7c21\u5358\u306a\u30e1\u30e2\u3067\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u306f Web \u30d0\u30fc\u30b8\u30e7\u30f3 \u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u696d\u3092\u4fdd\u5b58\u3057\u3066\u8868\u793a\u3057\u3001\u4fdd\u5b58\u30dc\u30bf\u30f3\u3092\u4f7f\u7528\u3057\u3066\u77ed\u3044 URL \u3092\u63d0\u4f9b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5f53\u521d\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306bSwift\/PHP\/Ruby\/JS\u306a\u3069\u306e\u6700\u65b0\u8a00\u8a9e\u3092\u4f7f\u3044\u305f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001VPS\u306e\u7279\u6027\u3092\u898b\u3066\u30b5\u30fc\u30d0\u30fc\u3092C\/C++\u3067\u66f8\u304f\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\u307e\u305a\u3001\u30b5\u30fc\u30d0\u30fc\u306b libfcgi \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001Web \u30b5\u30fc\u30d0\u30fc\u7528\u306e fcgi \u30b5\u30dd\u30fc\u30c8 \u30e2\u30b8\u30e5\u30fc\u30eb (Ubuntu \u3068 Apache \u306a\u3069) \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>sudo apt install libfcgi libapache2-mod-fcgid\n\n<\/code><\/pre>\n<\/div>\n<p>\u6b21\u306b\u3001config \u3067\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u69cb\u6210\u3057\u307e\u3059\u3002<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2556\" src=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2020\/02\/module.png\" alt=\"\" width=\"545\" height=\"119\" srcset=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2020\/02\/module.png 545w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2020\/02\/module-300x66.png 300w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><br \/>\nFcgidMaxProcessesPerClass &#8211;\u30af\u30e9\u30b9\u3042\u305f\u308a\u306e\u6700\u5927\u30d7\u30ed\u30bb\u30b9\u6570\u3067\u3059\u304c\u3001\u5927\u304d\u306a\u8ca0\u8377\u304c\u4e88\u60f3\u3055\u308c\u306a\u3044\u305f\u30811\u30d7\u30ed\u30bb\u30b9\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002<br \/>AddHandler fcgid-script .fcgi &#8211; fcgi \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u958b\u59cb\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u3002<br \/>CGI \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\u5143\u3068\u306a\u308b\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u69cb\u6210\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2557\" src=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2020\/02\/execgi.png\" alt=\"\" width=\"545\" height=\"82\" srcset=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2020\/02\/execgi.png 545w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2020\/02\/execgi-300x45.png 300w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><br \/>\n\u6b21\u306b\u3001fcgi \u30b5\u30dd\u30fc\u30c8\u3092\u5099\u3048\u305f C\/C++ \u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3001\u30a2\u30bb\u30f3\u30d6\u30eb\u3057\u3066\u3001\/var\/www\/html\/cgi-bin \u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<br \/>\u30b3\u30fc\u30c9\u3068\u30d3\u30eb\u30c9 \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f8b:<br \/><a href=\"https:\/\/gitlab.com\/demensdeum\/cube-art-project-server\/-\/blob\/master\/src\/cubeArtProjectServer.cpp\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/gitlab.com\/demensdeum\/cube-art-project-server\/-\/blob\/master\/src\/cubeArtProjectServer.cpp<\/a><br \/>\n<a href=\"https:\/\/gitlab.com\/demensdeum\/cube-art-project-server\/-\/blob\/master\/src\/build.sh\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/gitlab.com\/demensdeum\/cube-art-project-server\/-\/blob\/master\/src\/build.sh<\/a><br \/>\n\u3053\u306e\u5f8c\u3001Web \u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>systemctl restart apache2\n\n<\/code><\/pre>\n<\/div>\n<p>\u6b21\u306b\u3001chmod \u7d4c\u7531\u3067 cgi-bin \u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u6a29\u9650\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\u3053\u306e\u5f8c\u3001CGI \u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001Cube Art Project \u30b5\u30fc\u30d0\u30fc\u306e\u4f8b\u306e\u30ea\u30f3\u30af\u3092\u4f7f\u7528\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u7d4c\u7531\u3067\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3067\u3059\u3002<br \/><a href=\"http:\/\/192.243.103.70\/cgi-bin\/cubeArtProject\/cubeArtProjectServer.fcgi\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/192.243.103.70\/cgi-bin\/cubeArtProject\/cubeArtProjectServer.fcgi<\/a><br \/>\n\u4f55\u304b\u304c\u52d5\u4f5c\u3057\u306a\u3044\u5834\u5408\u306f\u3001Web \u30b5\u30fc\u30d0\u30fc\u306e\u30ed\u30b0\u3092\u78ba\u8a8d\u3059\u308b\u304b\u3001\u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u4f7f\u7528\u3057\u3066\u5b9f\u884c\u4e2d\u306e\u30d7\u30ed\u30bb\u30b9\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002\u30c7\u30d0\u30c3\u30b0 \u30d7\u30ed\u30bb\u30b9\u306f\u3001\u901a\u5e38\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30d0\u30c3\u30b0 \u30d7\u30ed\u30bb\u30b9\u3068\u7570\u306a\u3063\u3066\u3044\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<h3>\u30bd\u30fc\u30b9<\/h3>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/154187\/\" target=\"_blank\" rel=\"noopener\">https:\/\/habr.com\/ru\/post\/154187\/<\/\u3042\uff1e<br \/><a href=\"http:\/\/chriswu.me\/blog\/writing-hello-world-in-fcgi-with-c-plus-plus\/\" target=\"_blank\" rel=\"noopener\">http:\/\/chriswu.me\/blog\/writing-hello-world-in-fcgi-with-c-plus-plus\/<\/a><\/p>\n<h3>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h3>\n<p><a href=\"https:\/\/gitlab.com\/demensdeum\/cube-art-project-server\" target=\"_blank\" rel=\"noopener\">https:\/\/gitlab.com\/demensdeum\/cube-art -\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b5\u30fc\u30d0\u30fc<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>3D \u30a8\u30c7\u30a3\u30bf Cube Art Project \u306e\u30b5\u30fc\u30d0\u30fc\u90e8\u5206\u3092\u3069\u306e\u3088\u3046\u306b\u66f8\u3044\u305f\u304b\u306b\u3064\u3044\u3066\u306e\u7c21\u5358\u306a\u30e1\u30e2\u3067\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u306f Web \u30d0\u30fc\u30b8\u30e7\u30f3 \u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u696d\u3092\u4fdd\u5b58\u3057\u3066\u8868\u793a\u3057\u3001\u4fdd\u5b58\u30dc\u30bf\u30f3\u3092\u4f7f\u7528\u3057\u3066\u77ed\u3044 URL \u3092\u63d0\u4f9b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5f53\u521d\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306bSwift\/PHP\/Ruby\/JS\u306a\u3069\u306e\u6700\u65b0\u8a00\u8a9e\u3092\u4f7f\u3044\u305f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001VPS\u306e\u7279\u6027\u3092\u898b\u3066\u30b5\u30fc\u30d0\u30fc\u3092C\/C++\u3067\u66f8\u304f\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u307e\u305a\u3001\u30b5\u30fc\u30d0\u30fc\u306b libfcgi \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001Web \u30b5\u30fc\u30d0\u30fc\u7528\u306e fcgi \u30b5\u30dd\u30fc\u30c8 \u30e2\u30b8\u30e5\u30fc\u30eb (Ubuntu \u3068 Apache \u306a\u3069) \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 sudo apt install libfcgi libapache2-mod-fcgid \u6b21\u306b\u3001config \u3067\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u69cb\u6210\u3057\u307e\u3059\u3002 FcgidMaxProcessesPerClass &#8211;\u30af\u30e9\u30b9\u3042\u305f\u308a\u306e\u6700\u5927\u30d7\u30ed\u30bb\u30b9\u6570\u3067\u3059\u304c\u3001\u5927\u304d\u306a\u8ca0\u8377\u304c\u4e88\u60f3\u3055\u308c\u306a\u3044\u305f\u30811\u30d7\u30ed\u30bb\u30b9\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002AddHandler fcgid-script .fcgi &#8211; fcgi \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u958b\u59cb\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u3002CGI \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\u5143\u3068\u306a\u308b\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u69cb\u6210\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u6b21\u306b\u3001fcgi \u30b5\u30dd\u30fc\u30c8\u3092\u5099\u3048\u305f C\/C++ \u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3001\u30a2\u30bb\u30f3\u30d6\u30eb\u3057\u3066\u3001\/var\/www\/html\/cgi-bin \u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3068\u30d3\u30eb\u30c9 \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f8b:https:\/\/gitlab.com\/demensdeum\/cube-art-project-server\/-\/blob\/master\/src\/cubeArtProjectServer.cpp https:\/\/gitlab.com\/demensdeum\/cube-art-project-server\/-\/blob\/master\/src\/build.sh \u3053\u306e\u5f8c\u3001Web \u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 systemctl restart apache2 \u6b21\u306b\u3001chmod \u7d4c\u7531\u3067 cgi-bin \u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u6a29\u9650\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u3053\u306e\u5f8c\u3001CGI \u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001Cube Art<a class=\"more-link\" href=\"https:\/\/demensdeum.com\/blog\/ja\/2020\/02\/15\/cpp-fcgi\/\">Continue reading <span class=\"screen-reader-text\">&#8220;C++ FCGI \u3067\u306e\u30d0\u30c3\u30af\u30a8\u30f3\u30c9 \u30b5\u30fc\u30d0\u30fc\u306e\u4f5c\u6210&#8221;<\/span><\/a><\/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,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[61,52],"tags":[149],"class_list":["post-2555","post","type-post","status-publish","format-standard","hentry","category-techie","category-tutorials","tag-fcgi-apache-c-c","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"ja","enabled_languages":["en","ru","zh","de","fr","ja","pt"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":true,"content":true,"excerpt":false},"de":{"title":true,"content":true,"excerpt":false},"fr":{"title":true,"content":true,"excerpt":false},"ja":{"title":true,"content":true,"excerpt":false},"pt":{"title":true,"content":true,"excerpt":false}}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/posts\/2555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/comments?post=2555"}],"version-history":[{"count":17,"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/posts\/2555\/revisions"}],"predecessor-version":[{"id":3921,"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/posts\/2555\/revisions\/3921"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/media?parent=2555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/categories?post=2555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ja\/wp-json\/wp\/v2\/tags?post=2555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}