{"id":264,"date":"2015-09-28T01:11:42","date_gmt":"2015-09-27T16:11:42","guid":{"rendered":"http:\/\/www.kobori.me\/?p=264"},"modified":"2026-08-26T02:44:52","modified_gmt":"2026-08-25T17:44:52","slug":"web%e3%82%b5%e3%83%bc%e3%83%90%e3%81%ae%e6%a7%8b%e7%af%89-apachephp","status":"publish","type":"post","link":"https:\/\/kobori.me\/?p=264","title":{"rendered":"WEB\u30b5\u30fc\u30d0\u306e\u69cb\u7bc9 Apache+PHP"},"content":{"rendered":"<div class=\"section-number\">\n<section>\n<h1>\u306f\u3058\u3081\u306b<\/h1>\n<p>\u4eca\u56de\u306fPHP\u304c\u52d5\u4f5c\u3059\u308bWEB\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u3002<\/p>\n<p>\u203b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u95a2\u3057\u3066\u306f\u5f8c\u65e5\u8a2d\u5b9a\u3059\u308b\u3082\u306e\u3068\u3057\u3001\u6700\u5c0f\u306e\u624b\u9806\u3067\u69cb\u7bc9\u3059\u308b\u3002<br \/>\n    <\/section>\n<section>\n<h1>\u524d\u63d0\u6761\u4ef6<\/h1>\n<p>\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u306b\u3042\u305f\u308a\u524d\u63d0\u6761\u4ef6\u306f\u4ee5\u4e0b\u306e\u901a\u308a<\/p>\n<section>\n<h1>\u4eee\u60f3\u30b5\u30fc\u30d0<\/h1>\n<p>\u73fe\u5728\u5229\u7528\u4e2d\u306eGMO\u30d1\u30b0\u30ea\u30c3\u30af\u30af\u30e9\u30a6\u30c9\u306b\u65b0\u898f\u306b\u4f5c\u6210<\/p>\n<\/section>\n<section>\n<h1>\u4f7f\u7528\uff2f\uff33<\/h1>\n<p>CentOS 6.2 x64 kvm<\/p>\n<\/section>\n<section>\n<h1>\u30c9\u30e1\u30a4\u30f3<\/h1>\n<p>\u4eca\u56de\u306f\u691c\u8a3c\u7528\u306b\u4ee5\u4e0b\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u3001\u304a\u540d\u524d.com\u3067\u53d6\u5f97\u3002<\/p>\n<p><strong>hoge9.xyz<\/strong><\/p>\n<p><span style=\"color:red;\">\u203bDNS\u767b\u9332\u306f\u3001\u304a\u540d\u524d.com\u306eDNS\u30ec\u30b3\u30fc\u30c9\u8a2d\u5b9a\u3067\u3001\u5b8c\u4e86\u3057\u3066\u3044\u308b\u3082\u306e\u3068\u3059\u308b\u3002<\/span><\/p>\n<\/section>\n<\/section>\n<section>\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>\u4ee5\u4e0b\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<section>\n<ul>\n<li>httpd<\/li>\n<li>php<\/li>\n<\/ul>\n<p><span style=\"color:red;\">\u203bPHP\u306b\u3064\u3044\u3066\u306f\u3001\u5f8c\u7a0b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bWordPress\u3092\u8003\u616e\u30575.6\u3068\u3059\u308b\u3002<\/span><\/p>\n<\/section>\n<section>\n<h1>httpd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>            [bash firstline=&#8221;1&#8243;]<br \/>\n            yum -y install httpd<br \/>\n            [\/bash]<br \/>\n        <\/section>\n<section>\n<h1>php\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>CentOS6.2\u306b\u6a19\u6e96\u88c5\u5099\u3055\u308c\u308bPHP\u306f5.3\u3067\u3042\u308b\u3001\u305d\u306e\u70ba\u307e\u305a\u30015.6\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<p>            [bash firstline=&#8221;1&#8243;]<br \/>\n            rpm -ivh http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm<br \/>\n            rpm -ivh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-6.rpm<br \/>\n            [\/bash]<\/p>\n<p>\u901a\u5e38\u306a\u3089\u3001\u3053\u306e\u307e\u307e\u3001php\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u306f\u305a\u306a\u306e\u3060\u304c\u3001mirrors.fedoraproject.org \u306b\u63a5\u7d9a\u3059\u308b\u969b\u306b\u3001\u63a5\u7d9a\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u308b\u3002<br \/>\n               \u539f\u56e0\u306f\u3001epel\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30df\u30e9\u30fc\u300chttps:\/\/mirrors.fedoraproject.org\/\u300d\u306eSSL\u8a3c\u660e\u66f8\u304c\u66f4\u65b0\u3055\u308c\u305f\u4e8b\u306b\u3042\u308b\u3089\u3057\u3044\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u307e\u305a\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001NSS\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3002<\/p>\n<p>            [bash firstline=&#8221;1&#8243;]<br \/>\n            yum &#8211;disablerepo=epel update nss<br \/>\n            [\/bash]<\/p>\n<p>\u305d\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b<\/p>\n<p>            [bash firstline=&#8221;1&#8243;]<br \/>\n            yum update<br \/>\n            [\/bash]<\/p>\n<p>\u3053\u3053\u307e\u3067\u3067\u3001\u554f\u984c\u304c\u51fa\u306a\u3051\u308c\u3070\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001PHP5.6\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<p>            [bash firstline=&#8221;1&#8243;]<br \/>\n            yum -y install &#8211;enablerepo=remi-php56 php<br \/>\n            [\/bash]<br \/>\n        <\/section>\n<\/section>\n<section>\n<h1>\u8a2d\u5b9a<\/h1>\n<p>\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<section>\n<ul>\n<li>\/etc\/httpd\/conf\/httpd.conf<\/li>\n<li>\/etc\/php.ini<\/li>\n<\/ul>\n<\/section>\n<section>\n<h1>httpd.conf\u306e\u7de8\u96c6<\/h1>\n<p>276\u884c\u76ee\u4ed8\u8fd1\u306eServerName\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>            [bash firstline=&#8221;276&#8243;]<br \/>\n            ServerName hoge9.xyz:80<br \/>\n            [\/bash]<\/p>\n<p>402\u884c\u76ee\u4ed8\u8fd1\u306eDirectoryIndex\u306bindex.php\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<p>            [bash firstline=&#8221;402&#8243;]<br \/>\n            DirectoryIndex index.html index.html.var index.php<br \/>\n            [\/bash]<br \/>\n        <\/section>\n<section>\n<h1>php.ini\u306e\u7de8\u96c6<\/h1>\n<p>202\u884c\u76ee\u4ed8\u8fd1\u306eshort_open_tag = Off\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\u3002<br \/>\n            <span style=\"color:red;\">\u203bOn\u306b\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001PHP\u77ed\u7e2e\u30bf\u30b0\u306e\u5229\u7528\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/span><\/p>\n<p>            [bash firstline=&#8221;202&#8243;]<br \/>\n            ; short_open_tag = Off<br \/>\n            [\/bash]<br \/>\n            <span style=\"color:red;\">\u203b\u30c7\u30d5\u30a9\u30eb\u30c8\u306fOn\u306e\u70ba\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\u306e\u307f\u3067\u3088\u3044\u3002<\/span><br \/>\n        <\/section>\n<\/section>\n<section>\n<h1>\u8d77\u52d5\u3068\u52d5\u4f5c\u78ba\u8a8d<\/h1>\n<p>httpd\u3092\u8d77\u52d5\u3057\u3066\u3001\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\u3002<\/p>\n<section>\n<h1>httpd\u306e\u8d77\u52d5<\/h1>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067httpd\u3092\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<p>            [bash firstline=&#8221;1&#8243;]<br \/>\n            \/etc\/init.d\/httpd start<br \/>\n            [\/bash]<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u4ee5\u4e0b\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\u3002<\/p>\n<p>http:\/\/hoge9.xyz<\/p>\n<p>            <a href=\"http:\/\/www.kobori.me\/wp-content\/uploads\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2015-09-27-16.31.46.png\"><br \/>\n                <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.kobori.me\/wp-content\/uploads\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2015-09-27-16.31.46.png\" \n                    alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-09-27 16.31.46\" width=\"1248\" height=\"960\" \n                    class=\"aligncenter size-full wp-image-244\" \/><br \/>\n            <\/a><br \/>\n\u3000\u3000\u3000\u3000 <\/section>\n<section>\n<h1>index.html<\/h1>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\uff08\/var\/www\/html\uff09\u306b\u4ee5\u4e0b\u306e\u5185\u5bb9\u3067\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<p>            [html]<br \/>\n            &lt;!DOCTYPE HTML&gt;<br \/>\n            &lt;html lang=&quot;ja&quot;&gt;<br \/>\n                &lt;head&gt;<br \/>\n                    &lt;meta charset=&quot;utf-8&quot;&gt;<br \/>\n                    &lt;title&gt;HTML\u30b5\u30f3\u30d7\u30eb&lt;\/title&gt;<br \/>\n                &lt;\/head&gt;<br \/>\n                &lt;body&gt;<br \/>\n                    &lt;p&gt;HTML\u30b5\u30f3\u30d7\u30eb&lt;\/p&gt;<br \/>\n                    &lt;p&gt;Hello World!&lt;\/p&gt;<br \/>\n                &lt;\/body&gt;<br \/>\n            &lt;\/html&gt;<br \/>\n            [\/html]<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u4ee5\u4e0b\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\u3002<\/p>\n<p>http:\/\/hoge9.xyz\/index.html<\/p>\n<p>            <a href=\"http:\/\/www.kobori.me\/wp-content\/uploads\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2015-09-27-18.04.12.png\"><br \/>\n                <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.kobori.me\/wp-content\/uploads\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2015-09-27-18.04.12.png\" \n                    alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-09-27 18.04.12\" width=\"1248\" height=\"960\" \n                    class=\"aligncenter size-full wp-image-242\" \/><br \/>\n            <\/a><br \/>\n        <\/section>\n<section>\n<h1>index.php<\/h1>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\uff08\/var\/www\/html\uff09\u306b\u4ee5\u4e0b\u306e\u5185\u5bb9\u3067\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<p>            [html]<br \/>\n            &lt;?php<br \/>\n                $myname = &quot;hoge9.xyz&quot;;<br \/>\n            ?&gt;<br \/>\n            &lt;!DOCTYPE HTML&gt;<br \/>\n            &lt;html lang=&quot;ja&quot;&gt;<br \/>\n                &lt;head&gt;<br \/>\n                    &lt;meta charset=&quot;utf-8&quot;&gt;<br \/>\n                    &lt;title&gt;PHP\u30b5\u30f3\u30d7\u30eb&lt;\/title&gt;<br \/>\n                &lt;\/head&gt;<br \/>\n                &lt;body&gt;<br \/>\n                    &lt;p&gt;PHP\u30b5\u30f3\u30d7\u30eb&lt;\/p&gt;<br \/>\n                    &lt;p&gt;&lt;?php echo &#8216;Hello, World!&#8217; ?&gt;&lt;\/p&gt;<br \/>\n                    &lt;p&gt;&lt;?= $myname ?&gt;&lt;\/p&gt;<br \/>\n                &lt;\/body&gt;<br \/>\n            &lt;\/html&gt;<br \/>\n            [\/html]<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u4ee5\u4e0b\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\u3002<\/p>\n<p>http:\/\/hoge9.xyz\/index.php<\/p>\n<p>            <a href=\"http:\/\/www.kobori.me\/wp-content\/uploads\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2015-09-27-17.12.33.png\"><br \/>\n                <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.kobori.me\/wp-content\/uploads\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2015-09-27-17.12.33.png\" \n                alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-09-27 17.12.33\" width=\"1248\" height=\"960\" \n                class=\"aligncenter size-medium wp-image-227\" \/><br \/>\n            <\/a><br \/>\n        <\/section>\n<section>\n<h1>\u81ea\u52d5\u8d77\u52d5\u306e\u8a2d\u5b9a<\/h1>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u30b5\u30fc\u30d0\u306e\u8d77\u52d5\u6642\u306bhttpd\u304c\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>            [bash firstline=&#8221;1&#8243;]<br \/>\n            chkconfig httpd on<br \/>\n            [\/bash]<br \/>\n\u3000\u3000\u3000\u3000 <\/section>\n<\/section>\n<section>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3053\u3053\u307e\u3067\u306e\u4f5c\u696d\u3067PHP\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u52d5\u4f5c\u3059\u308b\u74b0\u5883\u304c\u5b8c\u6210\u3057\u305f\u304c\u3001\u3042\u304f\u307e\u3067\u6700\u4f4e\u9650\u3001\u52d5\u4f5c\u3059\u308b\u3068\u3044\u3046\u74b0\u5883\u3067\u3042\u308b\u3002<\/p>\n<p>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3084\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u9023\u643a\u7b49\u306b\u3064\u3044\u3066\u306f\u3001\u5225\u9014\u8a18\u8ff0\u3059\u308b\u3082\u306e\u3068\u3059\u308b\u3002<br \/>\n    <\/section>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4eca\u56de\u306fPHP\u304c\u52d5\u4f5c\u3059\u308bWEB\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u3002 \u203b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u95a2\u3057\u3066 &hellip; <a href=\"https:\/\/kobori.me\/?p=264\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-264","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/kobori.me\/index.php?rest_route=\/wp\/v2\/posts\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kobori.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kobori.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kobori.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kobori.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=264"}],"version-history":[{"count":1,"href":"https:\/\/kobori.me\/index.php?rest_route=\/wp\/v2\/posts\/264\/revisions"}],"predecessor-version":[{"id":403,"href":"https:\/\/kobori.me\/index.php?rest_route=\/wp\/v2\/posts\/264\/revisions\/403"}],"wp:attachment":[{"href":"https:\/\/kobori.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kobori.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kobori.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}