0

I currently have a Drupal 7 Multi-Site. In my sites folder, the domains are like this:

winatlife.guide
journal.winatlife.guide
store.winatlife.guide

I need to change the domains to this:

blog.blessingsjournal.com
journal.blessingsjournal.com
store.blessingsjournal.com

In addition, my root drupal folder is changing from win-at-life to blessingsjournal.

I have made all these changes. When I visit any of domains, I get the following error message:

Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

What could be chasing this? I haven't changed any of the permissions on the Drupal install.


Steps I have tried

1) Database Update

This StackOverflower answer says that the domain is hardcoded in the database and it provides a query to fix it. I have run the query, but it does't seem to have done anything. It was written in 2010, so maybe it's for Drupal 6?

2) Make a sites.php file

According to this Drupal Groups thread, in Drupal 7 multisites, you need to put a file called sites.php in the root sites directory. (In that directory there is an example.sites.php which can be used as a template).

I made a sites.php file and used the new domains but it had no effect. (Nb I did not need to use such a file before the domain change)

3) Checking .htaccess

My .htaccess is set as follows:

  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
   RewriteBase /
  • What did you put in sites.php? – cilefen Oct 25 '15 at 20:28
0

I was having problems because I was making a copy of the original site and then updating the code in the copy. For some reason the code was not copying properly. The databases were also not exporting properly from PHPmyadmin.

This is how I fixed it:

  1. My site was in hosting that had Cpanel. So using Cpanel I made an archive of the site. I then downloaded the archive, renamed it and then uploaded to create a new copy of the site. This copy was a perfect replica of the original, so it had no problems.

  2. For the databases, I used this command to export them via mysql in the command line:

    mysqldump -u DATABASEUSER -p'PASSWORD' DATABASENAME > dump.sql

In this command, you mustn't have a space after -p. So your command might look like this:

mysqldump -u host_mary -p'pass123' marywebsite > dump.sql 
  1. I then created new databases.

  2. Finally, I imported the code into the new databases using this command

    mysql -u DATABASEUSER -p'PASSWORD' DATABASENAME < dump.sql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.