Home>

Migrate the site that was running on the previous Linux server to the new server,
We are making the initial settings.
However, when I access it by specifying the IP address of the server with a local browser (http://XXX.XX.XX.XX/), the page is not displayed and the message "This site cannot be accessed" is displayed.
As a result of checking the error.log of apache, the following message was displayed.
I would like to know the cause and solution.

The error message that is occurring
// 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'
Corresponding source code
# httpd.conf
ServerRoot "/ etc/httpd"
Timeout 10
KeepAlive On
MaxKeepAliveRequests 180
KeepAliveTimeout 3
RLimitCPU 600
Listen 80
ServerTokens Prod
ServerSignature Off
TraceEnable Off
UseCanonicalName Off
FileETag None
HostnameLookups Off
ExtendedStatus On
EnableMMAP Off
EnableSendfile Off
#BufferedLogs On
Include conf.modules.d/*.conf
User apache
Group apache
#ServerAdmin root @ localhost
ServerName XXX.XX.XX.XX<Directory />AllowOverride none
  Require all denied</Directory><IfModule dir_module>DirectoryIndex index.php index.cgi index.shtml index.html</IfModule><Files ".ht *">Require all denied</Files><FilesMatch "^ (xmlrpc \ .php | wp-trackback \ .php)">Require all denied</FilesMatch>#
SetEnvIfNoCase Request_URI "\. (Gif | jpg | jpeg | png | svg | swf | cur | ico | js | css | eot | ttf | woff | woff2) $" no_log
SetEnvIf Remote_Addr "^ 127.0.0.1" no_log
ErrorLog "logs/error.log"
LogLevel warn<IfModule log_config_module>LogFormat "% h% l% u% t \"% r \ "%>s% b \"% {Referer} i \ "\"% {User-Agent} i \ "% v" combined
  LogFormat "% h% l% u% t \"% r \ "%>s% b" common
<IfModule logio_module>  #You need to enable mod_logio.c to use% I and% O
    LogFormat "% h% l% u% t \"% r \ "%>s% b \"% {Referer} i \ "\"% {User-Agent} i \ "% I% O" combinedio
</IfModule>CustomLog "logs/access.log" combined env =! no_log</IfModule><IfModule mime_module>TypesConfig /etc/mime.types
  AddType application/x-compress .Z
  AddType application/x-gzip .gz .tgz
  AddHandler cgi-script .cgi
  AddHandler type-map var
  AddType text/html .shtml
  AddOutputFilter INCLUDES .shtml</IfModule>AddDefaultCharset Off<IfModule mime_magic_module>MIMEMagicFile conf/magic</IfModule>#
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
# ErrorDocument 402 http://www.example.com/subscription_info.html
#EnableMMAP off
#EnableSendfile on
#Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
###
### My Section
###
AddType font/opentype .otf
AddType font/eot .eot
AddType font/truetype .ttf
AddType application/font-woff .woff
Include conf/Includes/*. conf
#
#DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.#
DocumentRoot "/ home/www"
#Further relax access to the default document root:<Directory "/ home/www"> #
   # Possible values ​​for the Options directive are "None", "All",
   # or any combination of:
   # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
   #
   # Note that "MultiViews" must be named * explicitly * --- "Options All"
   # doesn't give it to you.
   #
   #The Options directive is both complicated and important. Please see
   # http://httpd.apache.org/docs/2.4/mod/core.html#options
   # for more information.
   Options Indexes FollowSymLinks
   #
   # AllowOverride controls what directives may be placed in .htaccess files.
   #It can be "All", "None", or any combination of the keywords:
   #Options FileInfo AuthConfig Limit
   #
   AllowOverride None
   #
   #Controls who can get stuff from this server.
   #
   Require all granted</Directory>
# 00-directip.conf<VirtualHost XXX.XX.XX.XX: 80>ServerName XXX.XX.XX.XX
<Location />  Require all denied
</Location></VirtualHost><VirtualHost XXX.XX.XX.XX: 443>ServerName XXX.XX.XX.XX
  SSLEngine on
  SSLCertificateFile /etc/pki/tls/certs/localhost.crt
  SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
  SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
<Location />  Require all denied
</Location></VirtualHost>
What I tried

grep -r "VirtualHost"/*In, the contents of ServerName of 00-directip.conf and ServerName of httpd.conf that specified the IP address of the error message were matched, and apache was restarted, but it did not change.

Supplementary information (FW/tool version, etc.)

CentOS 8.2
PHP 7.4.24
Apache 2.4.37