skip to Main Content

I have a backup of a Drupal website which is running on a live web server CentOS 7. I have to restore this site on localhost. I have restored database successfully and website folder on localhost, but I am getting "Not Found" error on every page except home page.

I am trying to resolve this issue for one month but unable to resolve, please some one help me to restore the Drupal site on localhost

Now what I have done till now to get issue resolved is-

  1. Enabled mod_rewrite in .htaccess file at /var/www/html (I have placed my website file/folder in html folder)

    #Various rewrite rules.

    < IfModule mod_rewrite.c >

    RewriteEngine on

  2. Base Url (at /var/www/httml/site/default/settings.php)

    $config_directories = array();

    $base_url = "http://localhost/";

    ini_set(‘session.auto_start’, 0);

  3. Server configuration (at /etc/httpd/conf/httpd.conf)

    DocumentRoot "/var/www/html"

    <Directory "/var/www/html">
     AllowOverride All
     # Allow open access:
     Require all granted
    </Directory>
    
  4. Database setting (at /var/www/html/sites/default/settings.php)

    $databases[‘default’][‘default’] = array (

    ‘database’ => ‘databasenameofmysite’,

    ‘username’ => ‘root’,

    ‘password’ => ”,

    ‘prefix’ => ”,

    ‘host’ => ‘localhost’,

    ‘port’ => ‘3306’,

    ‘namespace’ => ‘DrupalCoreDatabaseDrivermysql’,

    ‘driver’ => ‘mysql’,

    );
    $databases[‘default’][‘myseconddb’] = array (

    ‘database’ => ‘seconddatabase’,

    ‘username’ => ‘root’,

    ‘password’ => ”,

    ‘prefix’ => ”,

    ‘host’ => ‘localhost’,

    ‘port’ => ‘3306’,

    ‘namespace’ => ‘DrupalCoreDatabaseDrivermysql’,

    ‘driver’ => ‘mysql’,

    );
    

    $settings[‘install_profile’] = ‘standard’;

    $config_directories[‘sync’] = ‘sites/default/files /config_zESQ5GgK5qMrKo8T75ePMTuxTIkbfrbzv3YQ0LEpvL-YeSdRapewGr-pZ0AHyYK2Z71SH-GGMw/sync’;

But unable to resolve issue any how?
error page

2

Answers


  1. Chosen as BEST ANSWER

    After so many struggle it was found that it was a problem PHP version running on live server machine and localhost machine. Now after matching PHP version on localhost it is running fine on Windows localhost but again struggling on CentOS7.


  2. After continuous tries, it is also resolved on CentOS 7. On CentOS 7 it is resolved by correcting .htaccess file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search