{"id":203,"date":"2026-04-05T23:18:54","date_gmt":"2026-04-05T14:18:54","guid":{"rendered":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=203"},"modified":"2026-04-05T23:18:54","modified_gmt":"2026-04-05T14:18:54","slug":"web%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e6%a7%8b%e7%af%89","status":"publish","type":"page","link":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=203","title":{"rendered":"Web\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9"},"content":{"rendered":"\n<p><strong>httpd\u3001php\u3001php-mbstring\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>dnf -y install httpd php php-mbstring\u3000<\/strong><br>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f:<\/p>\n\n\n\n<p><strong>mod_ssl\u3000\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><br>root@falcon21:~#&nbsp;<strong>dnf -y install mod_ssl<\/strong><\/p>\n\n\n\n<p><strong>Apache\u8a2d\u5b9a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><br><strong>Apache\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>vi \/etc\/httpd\/conf\/httpd.conf\u3000<\/strong><br>#ServerName www.example.com:80<br>\u2193<br>ServerName&nbsp;<strong>falcon21.space<\/strong>:80\u3000\u2190\u3000\u30b5\u30fc\u30d0\u30fc\u540d\u3092\u6307\u5b9a<br><br>&lt;Directory &#8220;\/var\/www\/html&#8221;&gt;<br><br>#<br># Possible values for the Options directive are &#8220;None&#8221;, &#8220;All&#8221;,<br># or any combination of:<br># Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews<br>#<br># Note that &#8220;MultiViews&#8221; must be named *explicitly* &#8212; &#8220;Options All&#8221;<br># doesn&#8217;t give it to you.<br>#<br># The Options directive is both complicated and important. Please see<br># http:\/\/httpd.apache.org\/docs-2.0\/mod\/core.html#options<br># for more information.<br>#<br>Options Indexes FollowSymLinks<br>\u3000\u3000\u2193<br><strong>Options Includes ExecCGI FollowSymLinks<\/strong>\u3000\u2190\u3000CGI,SSI\u306e\u8a31\u53ef<br><br>#<br># AllowOverride controls what directives may be placed in .htaccess files.<br># It can be &#8220;All&#8221;, &#8220;None&#8221;, or any combination of the keywords:<br># Options FileInfo AuthConfig Limit<br>#<br>AllowOverride None<br>\u3000\u3000\u2193<br><strong>AllowOverride All<\/strong>\u3000\u2190\u3000.htaccess\u306e\u8a31\u53ef<br><br>&lt;IfModule dir_module&gt;<br>DirectoryIndex index.html&nbsp;<strong>index.php index.cgi index.shtml<\/strong><br>&lt;\/IfModule&gt;<br><br>#<br># The following directives define some format nicknames for use with<br># a CustomLog directive (see below).<br>#<br>LogFormat &#8220;%h %l %u %t \\&#8221;%!414r\\&#8221; %&gt;s %b \\&#8221;%{Referer}i\\&#8221; \\&#8221;%{User-Agent}i\\&#8221;&#8221; commbined\u3000\u2190\u3000\u9577\u3059\u304e\u308bURI(414\u30a8\u30e9\u30fc)\u306f\u30ed\u30b0\u306b\u8a18\u9332\u3057\u306a\u3044<br><br>#<br># If you prefer a logfile with access, agent, and referer information<br># (Combined Logfile Format) you can use the following directive.<br>#<br><br><strong>SetEnvIf Remote_Addr 192.168.10 no_log<\/strong>\u3000\u2190\u3000\u8ffd\u52a0(\u5185\u90e8\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3092\u30ed\u30b0\u306b\u8a18\u9332\u3057\u306a\u3044)<br><strong>SetEnvIf Remote_Addr 127.0.0.1 no_log<\/strong>\u3000\u2190\u3000\u8ffd\u52a0(\u81ea\u30db\u30b9\u30c8\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3092\u30ed\u30b0\u306b\u8a18\u9332\u3057\u306a\u3044)<br><strong>CustomLog logs\/access_log combined env=!no_log<\/strong>\u3000\u2190\u3000\u4e0a\u8a18\u4ee5\u5916\u306e\u30a2\u30af\u30bb\u30b9\u3092\u30ed\u30b0\u306b\u8a18\u9332\u3059\u308b<br><br>AddDefaultCharset UTF-8<br>\u2193<br><strong>#<\/strong>AddDefaultCharset UTF-8\u3000\u2190\u3000\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8(\u6587\u5b57\u5316\u3051\u5bfe\u5fdc)\uff1f\u304b\u3048\u3063\u3066\u6587\u5b57\u5316\u3051<br><br>#AddHandler cgi-script .cgi<br>\u2193<br><strong>AddHandler cgi-script .cgi .pl<\/strong>\u3000\u2190\u3000CGI\u30b9\u30af\u30ea\u30d7\u30c8\u306b.pl\u3092\u8ffd\u52a0<br><br>\u4ee5\u4e0b\u3092\u6700\u7d42\u884c\u306b\u8ffd\u52a0<br><strong>TraceEnable off\u3000<\/strong>\u2190\u3000Trace\u30e1\u30bd\u30c3\u30c9\u3092\u7121\u52b9\u5316\uff08<a href=\"http:\/\/securitychecklist.net\/security\/cyber-attack\/Cross-Site-Tracing.html\" target=\"_blank\" rel=\"noreferrer noopener\">\u30af\u30ed\u30b9\u30b5\u30a4\u30c8\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0<\/a>\u5bfe\u7b56\uff09<br><br><strong>ServerTokens Prod<\/strong><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br><strong>httpd\u3000\u30c1\u30a7\u30c3\u30af<\/strong><br>root@falcon21:~#&nbsp;<strong>apachectl -t<\/strong><br>Syntax OK<br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br><strong>httpd \u6709\u52b9\u5316<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>systemctl enable &#8211;now httpd<\/strong><br><strong>Created symlink &#8216;\/etc\/systemd\/system\/multi-user.target.wants\/httpd.service&#8217; \u2192 &#8216;\/usr\/lib\/systemd\/system\/httpd.service&#8217;<\/strong>.<br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br><strong>\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u524a\u9664<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>rm -f \/etc\/httpd\/conf.d\/welcome.conf\u3000<\/strong><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br><strong>\/www\/html\/\u306b\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u4f5c\u6210<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>vi \/var\/www\/html\/index.html<\/strong><br>&lt;html&gt;<br>&lt;body&gt;<br>&lt;h1 style=&#8221;width: 100%; font-size: 40px; text-align: center;&#8221;&gt;<br><strong>\u53ea\u4eca\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4e2d<\/strong><br>&lt;\/h1&gt;<br>&lt;\/body&gt;<br>&lt;\/html&gt;<br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br><strong>httpd\u3000\u518d\u8d77\u52d5<\/strong><br>root@falcon21:~#&nbsp;<strong>systemctl restart httpd<\/strong><br><br><strong>httpd\u3000\u8d77\u52d5\u78ba\u8a8d<\/strong><br>root@falcon21:~#&nbsp;<strong>systemctl status httpd<\/strong><br>\u25cf&nbsp;httpd.service &#8211; The Apache HTTP Server<br>Loaded: loaded (\/usr\/lib\/systemd\/system\/httpd.service;&nbsp;<strong>enabled<\/strong>; preset: disabled)<br>Drop-In: \/etc\/systemd\/system\/httpd.service.d<br>\u2514\u2500php-fpm.conf<br>Active:&nbsp;<strong>active (running)<\/strong>&nbsp;since Wed 2025-11-12 09:21:56 JST; 22s ago<br>Invocation: dea95ddd28a14b83ae1abe8b4e6f2057<br>Docs: man:httpd.service(8)<br>Main PID: 5568 (httpd)<br>Status: &#8220;<strong>Total requests: 0; Idle\/Busy workers 100\/0;Requests\/sec: 0; Bytes served\/sec: 0 B\/sec<\/strong>&#8220;<br>Tasks: 177 (limit: 47782)<br>Memory: 13.4M (peak: 14M)<br>CPU: 104ms<br>CGroup: \/system.slice\/httpd.service<br>\u251c\u25005568 \/usr\/sbin\/httpd -DFOREGROUND<br>\u251c\u25005569 \/usr\/sbin\/httpd -DFOREGROUND<br>\u251c\u25005570 \/usr\/sbin\/httpd -DFOREGROUND<br>\u251c\u25005571 \/usr\/sbin\/httpd -DFOREGROUND<br>\u2514\u25005572 \/usr\/sbin\/httpd -DFOREGROUND<br><br>11\u6708 12 09:21:56 falcon21.space systemd[1]: Starting httpd.service &#8211; The Apache HTTP Server&#8230;<br>11\u6708 12 09:21:56 falcon21.space (httpd)[5568]:&nbsp;<strong>httpd.service: Referenced but unset environment variable evaluates to an empty string: O<\/strong>&gt;<br>11\u6708 12 09:21:56 falcon21.space httpd[5568]: Server configured, listening on: port 80<br>11\u6708 12 09:21:56 falcon21.space systemd[1]: Started httpd.service &#8211; The Apache HTTP Server.<br>~<br>***********************************************************************<br><br><strong>TCP80\u756a\u30dd\u30fc\u30c8\u958b\u653e<\/strong><br><strong>cockpit\u3000\u2192\u3000\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u3000\u2192\u3000\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb<\/strong><br><br><strong>\u30b5\u30fc\u30d0\u30fc\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u3000\u300c\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u8a2d\u5b9a\u300d\u3067\u78ba\u8a8d<\/strong><br>\u3000\u3000\u3000<strong>\u30b5\u30fc\u30d3\u30b9\u3000\u3000http 80<\/strong><br><br>***********************************************************************<br><br><strong>index.html \u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u8868\u793a\u78ba\u8a8d<\/strong><br><strong>http:\/\/192.168.10.3\/<\/strong><br>\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000<strong>\u53ea\u4eca\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4e2d<\/strong><br><br><strong>\u30b5\u30fc\u30d0\u30fc\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30fbfirefox \u3067\u8868\u793a\u3000<\/strong><br>\u30c9\u30e1\u30a4\u30f3\u3067\u306f\u8868\u793a\u3067\u304d\u306a\u3044\u3002<br><strong>Windows\u3000PC \u3067\u306f\u3001\u8868\u793a\u3067\u304d\u306a\u3044\u3002<\/strong><strong>&nbsp;ssl \u8a2d\u5b9a\u304c\u5fc5\u8981<\/strong><br><br>***********************************************************************<br><br>\u3000<strong>Perl\u30b3\u30de\u30f3\u30c9\u3078\/usr\/local\/bin\/perl\u3067\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/strong>\u3002<br><br><strong>\/usr\/local\/bin\/perl\u304b\u3089\/usr\/bin\/perl\u3078\u30ea\u30f3\u30af\u3092\u306f\u308b<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>ln -s \/usr\/bin\/perl \/usr\/local\/bin\/perl<\/strong>\u3000\u3000<br><br><br><strong>Perl\u306e\u30d1\u30b9\u3092\u78ba\u8a8d<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>whereis perl\u3000<\/strong><br>perl: \/usr\/bin\/perl \/usr\/local\/bin\/perl \/usr\/share\/man\/man1\/perl.1.gz\u3000\u2190\u3000Perl\u306e\u30d1\u30b9\u306b\/usr\/local\/bin\/perl\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d<br><br>\u3000<strong>CGI\u30da\u30fc\u30b8\u78ba\u8a8d<\/strong><br><strong>CGI\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u4f5c\u6210<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>vi \/var\/www\/html\/test.cgi<\/strong><br>#!\/usr\/local\/bin\/perl<br>print &#8220;Content-type: text\/html\\n\\n&#8221;;<br>print &#8220;&lt;html&gt;\\n&#8221;;<br>print &#8220;&lt;head&gt;\\n&#8221;;<br>print &#8220;&lt;meta http-equiv=\\&#8221;Content-Type\\&#8221; content=\\&#8221;text\/html; charset=UTF-8\\&#8221;&gt;\\n&#8221;;<br>print &#8220;&lt;title&gt;\u30c6\u30b9\u30c8&lt;\/title&gt;\\n&#8221;;<br>print &#8220;&lt;\/head&gt;\\n&#8221;;<br>print &#8220;&lt;body&gt;\\n&#8221;;<br>print &#8220;<strong>CGI\u30c6\u30b9\u30c8<\/strong>\\n&#8221;;<br>print &#8220;&lt;\/body&gt;\\n&#8221;;<br>print &#8220;&lt;\/html&gt;\\n&#8221;;<br><br><strong>\u30c6\u30b9\u30c8\u7528CGI\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u5909\u66f4<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>chmod 755 \/var\/www\/html\/test.cgi<\/strong><br><br><strong>http:\/\/192.168.10.3\/test.cgi&nbsp;\u306b\u30a2\u30af\u30bb\u30b9<\/strong><br><strong>CGI\u30c6\u30b9\u30c8<\/strong>&nbsp;\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000<strong>\u3000OK!!<\/strong><br><br>************************************************************************<br><br>\u3000<strong>PHP\u30da\u30fc\u30b8\u78ba\u8a8d<\/strong><br><strong>PHP\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u4f5c\u6210<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>vi \/var\/www\/html\/test.php<\/strong><br>&lt;?php<br>phpinfo();<br>?&gt;<br><br><strong>http:\/\/192.168.10.3\/test.php&nbsp;\u306b\u30a2\u30af\u30bb\u30b9<\/strong><br><br>phpinfo \u30da\u30fc\u30b8\u8868\u793a\u3000\u3000\u3000<strong>OK!!<\/strong><br><br><br>***********************************************************************<br><br><strong>SSI\u78ba\u8a8d<\/strong>\u3000\u3000\u3000<strong>SSI\u3067\u73fe\u5728\u65e5\u6642\u3092\u8868\u793a\u3057\u3066\u307f\u308b\u3002<\/strong><br><strong>SSI\u30c6\u30b9\u30c8\u7528\u30da\u30fc\u30b8\u4f5c\u6210<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>vi \/var\/www\/html\/test.shtml<\/strong><br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=UTF-8&#8243;&gt;<br>&lt;title&gt;\u30c6\u30b9\u30c8&lt;\/title&gt;<br>&lt;\/head&gt;<br>&lt;body&gt;<br>SSI\u30c6\u30b9\u30c8<br><strong>&lt;!&#8211;#config timefmt=&#8221;%Y\/%m\/%d %H:%M:%S&#8221; &#8211;&gt;<\/strong><br><strong>&lt;!&#8211;#echo var=&#8221;DATE_LOCAL&#8221; &#8211;&gt;<\/strong><br>&lt;\/body&gt;<br>&lt;\/html&gt;<br><br><br><strong>http:\/\/192.168.10.3\/test.shtml \u306b\u30a2\u30af\u30bb\u30b9<\/strong><br><br>SSI\u30c6\u30b9\u30c8 2025\/11\/12\/22:57:02&nbsp;<strong>\u65e5\u6642\u3092\u8868\u793a<\/strong>&nbsp;\u3000\u3000<strong>OK!!<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>httpd\u3001php\u3001php-mbstring\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb[root@falcon21 ~]#&nbsp;dnf -y install httpd php php-mbstring\u3000\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f: mod_ssl\u3000\u30a4\u30f3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-203","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=203"}],"version-history":[{"count":1,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/203\/revisions"}],"predecessor-version":[{"id":204,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/203\/revisions\/204"}],"wp:attachment":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}