404 response while accessing from hostname and works fine with IP address

Please forgive me as I am a first timer here.
The problem I am facing is “sometimes” owncloud give me a 404 error while accessing with hostname but it works with the ipAddress/owncloud URL. What could be the potential problem?

/etc/apache2/sites-available/owncloud.conf from IP address.

    <VirtualHost *:80>
         ServerAdmin admin
         DocumentRoot /var/www/html/owncloud/
         ServerName ***.com
         ServerAlias www.***.com

     Alias /owncloud "/var/www/html/owncloud/"

     <Directory /var/www/html/owncloud/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
          <IfModule mod_dav.c>
            Dav off
          </IfModule>
        SetEnv HOME /var/www/html/owncloud
        SetEnv HTTP_HOME /var/www/html/owncloud
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

following is my /var/www/html/owncloud/config/config.php file.

<?php
$CONFIG = array (
  'instanceid' => '***',
  'passwordsalt' => '***/',
  'secret' => '***',
  'trusted_domains' =>
  array (
    0=>'www.***.com',
    1=>'http://www.***.com',
    2=>'***.com',
    3=>'178.62.*.*',
    4=>'localhost',
),
  'datadirectory' => '/var/www/html/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '10.0.8.5',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'ownclouduser',
  'dbpassword' => '****',
  'logtimezone' => 'UTC',
  'installed' => true,
);

The apache log has the following error. But this error should not cause the untrusted domain problem.

'/var/www/html/status.php' not found or unable to stat
'/var/www/html/remote.php' not found or unable to stat

Maybe there is another apache configuration that might be conflicting with this one.