{"id":1575,"date":"2019-01-29T21:47:44","date_gmt":"2019-01-29T12:47:44","guid":{"rendered":"https:\/\/itport.cloud\/?p=1575"},"modified":"2019-04-11T13:09:45","modified_gmt":"2019-04-11T04:09:45","slug":"post-1575","status":"publish","type":"post","link":"https:\/\/itport.cloud\/?p=1575","title":{"rendered":"\uff08\u7b2c4\u56de\uff09Linux\u306bWordPress\u3092\u69cb\u7bc9\u3010CentOS7\u3011"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"e79baee6aca1-1\">\u76ee\u6b21<\/h3>\n\n\n\n<p>\n<a href=\"#0\">\u524d\u56de\u306e\u632f\u308a\u8fd4\u308a<\/a><br>\n<a href=\"#1\">Apache\u521d\u671f\u8a2d\u5b9a<\/a><br>\n<a href=\"#2\">VirtualHost\u8a2d\u5b9a<\/a><br>\n<a href=\"#3\">mod_ssl\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><br>\n<a href=\"#4\">\u7b2c4\u56de\u306e\u307e\u3068\u3081<\/a><br>\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"0\">\u524d\u56de\u306e\u632f\u308a\u8fd4\u308a<\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-it-port\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"Iux3PVDyGs\"><a href=\"https:\/\/itport.cloud\/?p=722\">\uff08\u7b2c3\u56de\uff09Linux\u306bWordPress\u3092\u69cb\u7bc9\u3010CentOS7\u3011<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/itport.cloud\/?p=722&#038;embed=true#?secret=Iux3PVDyGs\" data-secret=\"Iux3PVDyGs\" width=\"600\" height=\"338\" title=\"&#8220;\uff08\u7b2c3\u56de\uff09Linux\u306bWordPress\u3092\u69cb\u7bc9\u3010CentOS7\u3011&#8221; &#8212; IT PORT\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u524d\u56de\u306ffirewalld\u3067http\u3001https\u306e\u8a31\u53ef\u8a2d\u5b9a\u3092\u304a\u3053\u306a\u3044\u3001epel\u30ea\u30dd\u30b8\u30c8\u30ea\u3068remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001Apache2.4.38\u3001php73\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u304a\u3053\u306a\u3044\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u8a2d\u5b9a\u3092\u304a\u3053\u306a\u3063\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1\">Apache\u521d\u671f\u8a2d\u5b9a<\/h3>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fApache\u304cWeb\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u521d\u671f\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<br>\u307e\u305a\u306f \u8a3c\u660e\u66f8\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3084\u516c\u958b\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4f5c\u6210\u3068 httpd.conf \u306e\u8a2d\u5b9a\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# mkdir -p \/etc\/httpd\/ssl\n&#x5B;root@localhost ~]# chown apache:apache \/etc\/httpd\/ssl\n<\/pre><\/div>\n\n\n<p>\u3059\u3067\u306bSSL\u8a3c\u660e\u66f8\u304c\u3042\u308c\u3070\u300c\/etc\/httpd\/ssl\u300d\u306b\u683c\u7d0d\u3057\u3066\u304a\u304d\u307e\u3059\u3002\uff08\u79d8\u5bc6\u9375\u3068\u8a3c\u660e\u66f8\u3001\u4e2d\u9593CA\u8a3c\u660e\u66f8\u306e\uff13\u3064\u304c\u5fc5\u8981\u3067\u3059\u3002\uff09<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>www.example.com.crt (\u8a3c\u660e\u66f8)<\/li><li>www.example.com.key (\u79d8\u5bc6\u9375)<\/li><li>www.example.com.cer (\u4e2d\u9593CA\u8a3c\u660e\u66f8)<\/li><\/ul>\n\n\n\n<p class=\"has-text-color has-small-font-size has-vivid-red-color\">\u203b \u79d8\u5bc6\u9375\u306b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u304c\u304b\u304b\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u4e8b\u524d\u306b\u89e3\u9664\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<br><\/p>\n\n\n\n<p>\n\n\u6b21\u306b\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u30c6\u30b9\u30c8\u7528\u306ehtml\u3092\u914d\u7f6e\u3057\u3066\u304a\u304d\u307e\u3059\u3002\n\n<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# mkdir -p \/var\/www\/www.example.com\/htdocs\n&#x5B;root@localhost ~]# echo \"TEST PAGE\" > \/var\/www\/www.example.com\/htdocs\/index.html\n&#x5B;root@localhost ~]# chown -R apache:apache \/var\/www\/www.example.com\/htdocs\n<\/pre><\/div>\n\n\n<p>\u7d9a\u3044\u3066Apache\u306e\u8a2d\u5b9a\u3092\u5f04\u308a\u307e\u3059\u3002<br>httpd.conf \u306e95\u884c\u76ee\u4ed8\u8fd1\u306b\u300cServerName\u300d\u3068\u3044\u3046\u8a2d\u5b9a\u9805\u76ee\u304c\u3042\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u3063\u305f\u4e0a\u3067\u4fee\u6b63\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# cp \/etc\/httpd\/conf\/httpd.conf \/etc\/httpd\/conf\/httpd.conf.org\n&#x5B;root@localhost ~]# vi \/etc\/httpd\/conf\/httpd.conf\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; first-line: 95; title: ; notranslate\" title=\"\">\n#ServerName www.example.com:80\nServerName localhost:80\n<\/pre><\/div>\n\n\n<p>\u307e\u305f\u3001\u6700\u7d42\u884c\u4ed8\u8fd1\u306b\u300cIncludeOptional\u300d\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; first-line: 354; title: ; notranslate\" title=\"\">\nIncludeOptional conf.d\/*.conf\n<\/pre><\/div>\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2\">Virtual Host \u306b\u8a2d\u5b9a\u3092\u66f8\u304f<\/h3>\n\n\n\n<p>WordPress\u30b5\u30a4\u30c8\u3092\u5897\u3084\u3059\u3053\u3068\u3082\u60f3\u5b9a\u3057\u3066\u4eca\u56de\u306f <a rel=\"noreferrer noopener\" href=\"https:\/\/httpd.apache.org\/docs\/2.4\/ja\/vhosts\/examples.html\" target=\"_blank\">Virtual Host<\/a>\u3068\u3044\u3046\u65b9\u6cd5\u306e\u8a2d\u5b9a\u3067\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<br>\u5404\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3001Virtual Host\u7528\u306eApache\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br>\u4eca\u56de\u306f\u4f5c\u6210\u4f8b\u3068\u3057\u3066\u300cwww.example.com\u300d\u3068\u3044\u3046\u3001\u3044\u304b\u306b\u3082\u306a\u540d\u524d\u306e\u30b5\u30a4\u30c8\u3092\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u74b0\u5883\u3067\u4f5c\u6210\u3057\u307e\u3059\u3002 <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# vi \/etc\/httpd\/conf.d\/www.example.conf\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;VirtualHost *:80>\n  ServerName www.example.com\n  ServerAdmin webmaster@example.com\n  DocumentRoot \/var\/www\/www.example.com\/htdocs\/\n  ErrorLog logs\/www.example.com-error_log\n  LogLevel warn\n  LogFormat \"%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\" combined\n  LogFormat \"%h %l %u %t \\\"%r\\\" %>s %b\" common\n  LogFormat \"%{Referer}i -> %U\" referer\n  LogFormat \"%{User-agent}i\" agent\n  CustomLog \/var\/log\/httpd\/www.example.com-access_log combined env=!image-request\n  &lt;Directory \"\/var\/www\/www.example.com\/htdocs\/\">\n    DirectoryIndex index.php index.hml\n    Options Indexes FollowSymLinks\n    AllowOverride All\n    &lt;RequireAll>\n      Require all granted\n    &lt;\/RequireAll>\n  &lt;\/Directory>\n&lt;\/VirtualHost>\n\n&lt;VirtualHost *:443>\n ServerName www.example.com:443\n ServerAdmin webmaster@example.com\n DocumentRoot \"\/var\/www\/www.example.com\/htdocs\"\n ErrorLog logs\/www.example.com-ssl-error_log\n TransferLog logs\/www.example.com-ssl-access_log\n LogLevel warn\n LogFormat \"%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\" combined\n LogFormat \"%h %l %u %t \\\"%r\\\" %>s %b\" common\n LogFormat \"%{Referer}i -> %U\" referer\n CustomLog \/var\/log\/httpd\/www.example.com-ssl-access_log combined env=!image-request\n SSLEngine on\n SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1\n SSLProxyProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1\n SSLHonorCipherOrder On\n SSLCertificateFile \/etc\/httpd\/ssl\/www.example.com.crt\n SSLCertificateKeyFile \/etc\/httpd\/ssl\/www.example.com.key\n SSLCertificateChainFile \/etc\/httpd\/ssl\/www.example.com.cer\n &lt;Files ~ \"\\.(cgi|shtml|phtml|php3?)$\">\n     SSLOptions +StdEnvVars\n &lt;\/Files>\n &lt;Directory \"\/var\/www\/cgi-bin\">\n     SSLOptions +StdEnvVars\n &lt;\/Directory>\n &lt;Directory \"\/var\/www\/www.example.com\/htdocs\">\n   DirectoryIndex index.php index.hml\n   Options Indexes FollowSymLinks\n   AllowOverride All\n   &lt;RequireAll>\n     Require all granted\n   &lt;\/RequireAll>\n &lt;\/Directory>\n BrowserMatch \"MSIE &#x5B;2-5]\" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0\n CustomLog logs\/ssl_request_log \"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \\\"%r\\\" %b\"\n&lt;\/VirtualHost>\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-small-font-size has-vivid-red-color\">\u203b \u300c&lt;\u300d\u304c\u300c\uff06lt;\u300d\u306b\u5909\u63db\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30b3\u30d4\u30fc\u3059\u308b\u969b\u306f\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u4e00\u5ea6\u3001\u8a2d\u5b9a\u304c\u6b63\u3057\u304f\u51fa\u6765\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# httpd -t\nAH00526: Syntax error on line 31 of \/etc\/httpd\/conf.d\/www.example.conf:\nInvalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration\n<\/pre><\/div>\n\n\n<p>\u304a\u3063\u3068\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u6c17\u3065\u304d\u307e\u3057\u305f\u3002SSL\u8a2d\u5b9a\u3067\u5fc5\u8981\u306amod_ssl \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u304a\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\uff08mod_ssl\u306e\u5b58\u5728\u3092\u5fd8\u308c\u304c\u3061\u306b\u306a\u308b\u306e\u306f\u79c1\u3060\u3051\u3067\u3057\u3087\u3046\u304b\u3002\uff09<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3\"> mod_ssl\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb <\/h3>\n\n\n\n<p>\u8a00\u3044\u8a33\u306f\u3055\u3066\u304a\u304d\u3001yum\u30b3\u30de\u30f3\u30c9\u3067mod_ssl\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost conf.d]# yum install mod_ssl --disablerepo=base --disablerepo=updates --enablerepo=ius\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, langpacks\nLoading mirror speeds from cached hostfile\n * extras: ftp.tsukuba.wide.ad.jp\n * ius: hkg.mirror.rackspace.com\n * remi-safe: ftp.riken.jp\n\u4f9d\u5b58\u6027\u306e\u89e3\u6c7a\u3092\u3057\u3066\u3044\u307e\u3059\n--> \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u78ba\u8a8d\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 httpd24u-mod_ssl.x86_64 1:2.4.38-1.ius.centos7 \u3092 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n--> \u4f9d\u5b58\u6027\u89e3\u6c7a\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\n\n\u4f9d\u5b58\u6027\u3092\u89e3\u6c7a\u3057\u307e\u3057\u305f\n\n========================================================================================================================================================================\n Package                                     \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc                  \u30d0\u30fc\u30b8\u30e7\u30f3                                          \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc                    \u5bb9\u91cf\n========================================================================================================================================================================\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d:\n httpd24u-mod_ssl                            x86_64                            1:2.4.38-1.ius.centos7                              ius                            114 k\n\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u8981\u7d04\n========================================================================================================================================================================\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb  1 \u30d1\u30c3\u30b1\u30fc\u30b8\n\n\u7dcf\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5bb9\u91cf: 114 k\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5bb9\u91cf: 240 k\nIs this ok &#x5B;y\/d\/N]: y\nDownloading packages:\nhttpd24u-mod_ssl-2.4.38-1.ius.centos7.x86_64.rpm                      0% &#x5B;                                                            ]  0.0 B\/s |\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n  \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d          : 1:httpd24u-mod_ssl-2.4.38-1.ius.centos7.x86_64 &#x5B;                                                                                      ] 1\/1\n  \u691c\u8a3c\u4e2d                  : 1:httpd24u-mod_ssl-2.4.38-1.ius.centos7.x86_64                                                                                          1\/1\n\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\n  httpd24u-mod_ssl.x86_64 1:2.4.38-1.ius.centos7\n\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!\n<\/pre><\/div>\n\n\n<p>\u4e00\u5ea6\u3001Apache\u3092\u518d\u8d77\u52d5\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u304c\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u306f\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u30c1\u30a7\u30c3\u30af\u3092\u3057\u3066\u304b\u3089\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u72b6\u614b\u306e\u78ba\u8a8d\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; highlight: [2]; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# httpd -t\nSyntax OK\n<\/pre><\/div>\n\n\n<p>\u300csyntax OK\u300d\u3068\u5fdc\u7b54\u3059\u308c\u3070\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u8aa4\u5b57\u304c\u7121\u3044\u72b6\u614b\u3067\u3059\u3002\u3042\u3068\u306f\u975e\u63a8\u5968\u306a\u66f8\u304d\u65b9\u306a\u3093\u304b\u3082\u6559\u3048\u3066\u304f\u308c\u305f\u308a\u3057\u307e\u3059\u3002\u66f8\u304d\u65b9\u306f\u5408\u3063\u3066\u3044\u308b\u3051\u3069\u8a2d\u5b9a\u3057\u305f\u3044\u5185\u5bb9\u81ea\u4f53\u304c\u8aa4\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u610f\u56f3\u3057\u306a\u3044\u52d5\u4f5c\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br>\u3061\u306a\u307f\u306b\u8a2d\u5b9a\u306b\u8aa4\u5b57\u304c\u3042\u3063\u305f\u969b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u3092\u8868\u793a\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; highlight: [2,3,4,5]; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost httpd]# httpd -t\nAH00526: Syntax error on line 56 of \/etc\/httpd\/conf.d\/www.example.conf:\nInvalid command 'aaa', perhaps misspelled or defined by a module not included in the server configuration\n<\/pre><\/div>\n\n\n<p>\u4e0a\u8a18\u306e\u30a8\u30e9\u30fc\u306f\u308f\u3056\u3068www.example.conf\u306e56\u884c\u76ee\u306b\u300caaa\u300d\u3068\u3044\u3046\u6587\u5b57\u3092\u8a18\u8ff0\u3057\u307e\u3057\u305f\u3002<br>\u6b21\u306b\u73fe\u5728\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002\u300csystemctl status httpd.service\u300d\u3082\u3057\u304f\u306f\u300cservice httpd status\u300d\u3068\u5165\u529b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# systemctl status httpd.service\n\u25cf httpd.service - The Apache HTTP Server\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/httpd.service; disabled; vendor preset: disabled)\n   Active: active (running) since \u6708 2019-01-28 22:29:25 JST; 1min 56s ago\n     Docs: man:httpd(8)\n           man:apachectl(8)\n  Process: 9935 ExecStop=\/bin\/kill -WINCH ${MAINPID} (code=exited, status=0\/SUCCESS)\n  Process: 8965 ExecReload=\/usr\/sbin\/httpd $OPTIONS -k graceful (code=exited, status=0\/SUCCESS)\n Main PID: 9939 (httpd)\n   Status: \"Total requests: 0; Current requests\/sec: 0; Current traffic:   0 B\/sec\"\n   CGroup: \/system.slice\/httpd.service\n           tq9939 \/usr\/sbin\/httpd -DFOREGROUND\n           tq9940 \/usr\/sbin\/httpd -DFOREGROUND\n           tq9941 \/usr\/sbin\/httpd -DFOREGROUND\n           tq9942 \/usr\/sbin\/httpd -DFOREGROUND\n           tq9943 \/usr\/sbin\/httpd -DFOREGROUND\n           mq9944 \/usr\/sbin\/httpd -DFOREGROUND\n\n 1\u6708 28 22:29:25 localhost.localdomain systemd&#x5B;1]: Stopped The Apache HTTP Server.\n 1\u6708 28 22:29:25 localhost.localdomain systemd&#x5B;1]: Starting The Apache HTTP Server...\n 1\u6708 28 22:29:25 localhost.localdomain systemd&#x5B;1]: Started The Apache HTTP Server.\n<\/pre><\/div>\n\n\n<p>Apache\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u306e\u3067\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002\uff08 graceful \u3082\u3057\u304f\u306f restart \uff09<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# systemctl restart httpd.service\n<\/pre><\/div>\n\n\n<p>\u518d\u8d77\u52d5\u304c\u5b8c\u4e86\u3057\u305f\u3089\u624b\u5143\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b\u524d\u306b\u624b\u5143\u306ePC\u306eHosts\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u8a18\u3057\u3066\u540d\u524d\u89e3\u6c7a\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<table class=\"wp-block-table is-style-regular\"><tbody><tr><td> Windows \u306e\u5834\u5408<\/td><td> C:\\Windows\\System32\\drivers\\etc\\hosts <\/td><\/tr><tr><td>Mac \u306e\u5834\u5408<\/td><td>\/etc\/hosts<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002\uff08x.x.x.x \u306fLinux\u306eIP\u30a2\u30c9\u30ec\u30b9\u306b\u7f6e\u304d\u63db\u3048\u3066\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\nx.x.x.x www.example.com\n<\/pre><\/div>\n\n\n<p>\u3067\u306fGoogle Chrome\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"643\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage-1024x643.png\" alt=\"\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\" class=\"wp-image-1848\" srcset=\"https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage-1024x643.png 1024w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage-300x188.png 300w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage-768x482.png 768w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage-450x283.png 450w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage-900x565.png 900w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/testpage.png 1143w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>TEST PAGE<\/figcaption><\/figure>\n\n\n\n<p>\u8868\u793a\u3055\u308c\u307e\u3057\u305f\uff01\uff01\u3000&#8230;\u3067\u3082\u5bc2\u3057\u3044\u753b\u9762\u3067\u3059\u306d\u3002<br>\u7d9a\u3044\u3066PHP\u306e\u8a2d\u5b9a\u3092\u4e00\u89a7\u8868\u793a\u3057\u305f\u3044\u306e\u3067phpinfo()\u95a2\u6570\u3092\u4ed5\u8fbc\u3093\u3060\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;root@localhost ~]# echo \"&lt;?php phpinfo(); ?>\" > \/var\/www\/www.example.com\/htdocs\/info.php\n<\/pre><\/div>\n\n\n<p>info.php\u3092\u4f5c\u3063\u305f\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3059\u3002( http:\/\/www.example.com\/info.php )<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"703\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-1024x703.png\" alt=\"infophp\" class=\"wp-image-1858\" srcset=\"https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-1024x703.png 1024w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-300x206.png 300w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-768x528.png 768w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-140x96.png 140w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-280x192.png 280w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-450x309.png 450w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1-900x618.png 900w, https:\/\/itport.cloud\/wp-content\/uploads\/2019\/01\/infophp-1.png 1278w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>info.php<\/figcaption><\/figure>\n\n\n\n<p>\u7121\u4e8b\u306bPHP\u306e\u8a2d\u5b9a\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<br>\u3053\u306e\u753b\u9762\u306f\u5f8c\u3067\u8a2d\u5b9a\u95a2\u9023\u3067\u30a8\u30e9\u30fc\u306a\u3069\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u8db3\u308a\u306a\u3044PHP\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u7121\u3044\u304b\u306a\u3069\u78ba\u8a8d\u3059\u308b\u306e\u306b\u4fbf\u5229\u3067\u3059\u3002\uff08\u30b5\u30a4\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u969b\u306f\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u6d88\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff09<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4\">\u7b2c4\u56de\u306e\u307e\u3068\u3081<\/h3>\n\n\n\n<p>\u4eca\u56de\u306f\u624b\u5143\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3068\u3053\u308d\u307e\u3067\u8a2d\u5b9a\u3092\u3057\u305f\u306e\u3068\u3001\u4e00\u7dd2\u306bmod_ssl\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057 SSL\u901a\u4fe1\u306e\u8a2d\u5b9a\u3082\u3057\u307e\u3057\u305f\u3002<br><br>\u6628\u4eca\u306fSSL\u6697\u53f7\u5316\u901a\u4fe1\u304c\u6a19\u6e96\u306b\u306a\u308a\u3064\u3064\u3042\u308a\u307e\u3059\u3002<br>\u305f\u3060\u3057SSL\u901a\u4fe1\u3092\u3059\u308b\u306b\u306f\u3082\u3061\u308d\u3093SSL\u8a3c\u660e\u66f8\u3092\u8cfc\u5165\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002\uff08&#8230;\u307e\u3041Web\u30b5\u30a4\u30c8\u3092\u4f5c\u6210\u3059\u308b\u4e0a\u3067\u5fc5\u9808\u306b\u8fd1\u3044\u5b58\u5728\u3068\u306a\u3063\u3066\u304d\u3066\u3044\u307e\u3059\u3088\u306d\u3002\uff09<br><br>\u305d\u308c\u3068\u6697\u53f7\u5316\u901a\u4fe1\u3068\u3044\u3063\u3066\u3082\u8106\u5f31\u6027\u304c\u8272\u3005\u3068\u767a\u898b\u3055\u308c\u3066\u304a\u308a\u3001\u73fe\u5728\u3067\u306fTLS1.2\u3092\u4f7f\u3046\u3088\u3046\u306b\u8a2d\u5b9a\u3092\u3057\u305f\u65b9\u304c\u826f\u304b\u3063\u305f\u308a\u3068\u3001\u3088\u308a\u30bb\u30ad\u30e5\u30a2\u306a\u901a\u4fe1\u306b\u306a\u308b\u3088\u3046\u6c17\u306b\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u3053\u3068\u306f\u305f\u304f\u3055\u3093\u3042\u308a\u305d\u3046\u3067\u3059\u3002<br><br>\u3055\u3066\u3001\u6b21\u56de\u306f\u3044\u3088\u3044\u3088WordPress\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\uff01\uff01<\/p>\n\n\n<ul class=\"lcp_catlist\" id=\"lcp_instance_0\"><\/ul>\n","protected":false},"excerpt":{"rendered":"\u76ee\u6b21 \u524d\u56de\u306e\u632f\u308a\u8fd4\u308a Apache\u521d\u671f\u8a2d\u5b9a VirtualHost\u8a2d\u5b9a mod_ssl\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u7b2c4\u56de\u306e\u307e\u3068\u3081 \u524d\u56de\u306e\u632f\u308a\u8fd4\u308a https:\/\/itport.cloud\/?p=722 \u524d\u56de\u306ffirewalld\u3067http\u3001https\u306e\u8a31\u53ef\u8a2d\u5b9a\u3092\u304a\u3053\u306a\u3044\u3001epel\u30ea\u30dd\u30b8\u30c8\u30ea\u3068remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001Apache2.4.38\u3001php73\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u304a\u3053\u306a\u3044\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u8a2d\u5b9a\u3092\u304a\u3053\u306a\u3063\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 Apache\u521d\u671f\u8a2d\u5b9a \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fApache\u304cWeb\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u521d\u671f\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002\u307e\u305a\u306f \u8a3c\u660e\u66f8\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3084\u516c\u958b\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4f5c\u6210\u3068 httpd.conf \u306e\u8a2d&hellip;","protected":false},"author":3,"featured_media":1578,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[15],"class_list":{"0":"post-1575","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wordpress","8":"tag-season3"},"_links":{"self":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/1575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1575"}],"version-history":[{"count":118,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/1575\/revisions"}],"predecessor-version":[{"id":5800,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/1575\/revisions\/5800"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/media\/1578"}],"wp:attachment":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}