前提・実現したいこと
前のLinuxサーバーで動いていたサイトをデータを新サーバーへ移行し、
初期設定を行っております。
しかしながら、ローカルのブラウザでサーバーのIPアドレスを指定し(http://XXX.XX.XX.XX/)アクセスしたところ、ページが表示されず"このサイトにアクセスできません"のメッセージがでます。
apacheのerror.logを確認した結果、下記のメッセージが出ておりました。
原因と解決策をお教えいただきたいです。
発生しているエラーメッセージ
//error-log [Thu Nov 19 11:59:02.102392 2020] [suexec:notice] [pid 484944] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Nov 19 11:59:02.136088 2020] [ssl:warn] [pid 484944] AH01909: XXX.XX.XX.XX:443:0 server certificate does NOT include an ID which matches the server name [Thu Nov 19 11:59:02.224061 2020] [ssl:warn] [pid 484944] AH01909: XXX.XX.XX.XX:443:0 server certificate does NOT include an ID which matches the server name [Thu Nov 19 11:59:02.605230 2020] [mpm_prefork:notice] [pid 484944] AH00163: Apache/2.4.37 (centos) OpenSSL/1.1.1c PHP/7.3.20 configured -- resuming normal operations [Thu Nov 19 11:59:02.605263 2020] [core:notice] [pid 484944] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
該当のソースコード
conf
1 2# httpd.conf 3ServerRoot "/etc/httpd" 4 5Timeout 10 6KeepAlive On 7MaxKeepAliveRequests 180 8KeepAliveTimeout 3 9RLimitCPU 600 10 11Listen 80 12 13ServerTokens Prod 14ServerSignature Off 15TraceEnable Off 16UseCanonicalName Off 17FileETag None 18HostnameLookups Off 19ExtendedStatus On 20EnableMMAP Off 21EnableSendfile Off 22#BufferedLogs On 23 24Include conf.modules.d/*.conf 25 26User apache 27Group apache 28 29#ServerAdmin root@localhost 30ServerName XXX.XX.XX.XX 31 32<Directory /> 33 AllowOverride none 34 Require all denied 35</Directory> 36 37<IfModule dir_module> 38 DirectoryIndex index.php index.cgi index.shtml index.html 39</IfModule> 40 41<Files ".ht*"> 42 Require all denied 43</Files> 44 45<FilesMatch "^(xmlrpc.php|wp-trackback.php)"> 46 Require all denied 47</FilesMatch> 48 49# 50SetEnvIfNoCase Request_URI ".(gif|jpg|jpeg|png|svg|swf|cur|ico|js|css|eot|ttf|woff|woff2)$" no_log 51SetEnvIf Remote_Addr "^127.0.0.1" no_log 52 53ErrorLog "logs/error.log" 54LogLevel warn 55 56<IfModule log_config_module> 57 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %v" combined 58 LogFormat "%h %l %u %t \"%r\" %>s %b" common 59 <IfModule logio_module> 60 # You need to enable mod_logio.c to use %I and %O 61 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 62 </IfModule> 63 CustomLog "logs/access.log" combined env=!no_log 64</IfModule> 65 66<IfModule mime_module> 67 TypesConfig /etc/mime.types 68 AddType application/x-compress .Z 69 AddType application/x-gzip .gz .tgz 70 AddHandler cgi-script .cgi 71 AddHandler type-map var 72 AddType text/html .shtml 73 AddOutputFilter INCLUDES .shtml 74</IfModule> 75 76AddDefaultCharset Off 77 78<IfModule mime_magic_module> 79 MIMEMagicFile conf/magic 80</IfModule> 81 82# 83#ErrorDocument 500 "The server made a boo boo." 84#ErrorDocument 404 /missing.html 85#ErrorDocument 404 "/cgi-bin/missing_handler.pl" 86#ErrorDocument 402 http://www.example.com/subscription_info.html 87 88#EnableMMAP off 89#EnableSendfile on 90 91# Supplemental configuration 92# 93# Load config files in the "/etc/httpd/conf.d" directory, if any. 94IncludeOptional conf.d/*.conf 95 96### 97### My Section 98### 99AddType font/opentype .otf 100AddType font/eot .eot 101AddType font/truetype .ttf 102AddType application/font-woff .woff 103 104Include conf/Includes/*.conf 105 106# 107# DocumentRoot: The directory out of which you will serve your 108# documents. By default, all requests are taken from this directory, but 109# symbolic links and aliases may be used to point to other locations. 110# 111DocumentRoot "/home/www" 112 113# Further relax access to the default document root: 114<Directory "/home/www"> 115 # 116 # Possible values for the Options directive are "None", "All", 117 # or any combination of: 118 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 119 # 120 # Note that "MultiViews" must be named *explicitly* --- "Options All" 121 # doesn't give it to you. 122 # 123 # The Options directive is both complicated and important. Please see 124 # http://httpd.apache.org/docs/2.4/mod/core.html#options 125 # for more information. 126 Options Indexes FollowSymLinks 127 128 # 129 # AllowOverride controls what directives may be placed in .htaccess files. 130 # It can be "All", "None", or any combination of the keywords: 131 # Options FileInfo AuthConfig Limit 132 # 133 AllowOverride None 134 135 # 136 # Controls who can get stuff from this server. 137 # 138 Require all granted 139</Directory>
conf
1# 00-directip.conf 2<VirtualHost XXX.XX.XX.XX:80> 3 ServerName XXX.XX.XX.XX 4 <Location /> 5 Require all denied 6 </Location> 7</VirtualHost> 8 9<VirtualHost XXX.XX.XX.XX:443> 10 ServerName XXX.XX.XX.XX 11 SSLEngine on 12 SSLCertificateFile /etc/pki/tls/certs/localhost.crt 13 SSLCertificateKeyFile /etc/pki/tls/private/localhost.key 14 SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt 15 <Location /> 16 Require all denied 17 </Location> 18</VirtualHost>
試したこと
grep -r "VirtualHost" /*
にて、エラーメッセージのipアドレスを指定していた00-directip.confのServerNameとhttpd.confのServerNameの内容をあわせ、apacheの再起動を行いましたが、変わらずでした。
補足情報(FW/ツールのバージョンなど)
CentOS 8.2
PHP 7.4.24
Apache 2.4.37
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/11/19 06:18
2020/11/19 06:55
2020/11/19 07:36
2020/11/19 08:14
2020/11/19 08:32
2020/11/19 08:43
2020/11/20 07:11 編集
2020/11/20 00:29
2020/11/20 02:35