1
votes

I have set up 2 drupal instances pointing 2 codebase with a common database

  1. www.abc.com points to folder /var/www/abcfolder
  2. mywww.abc.com points to folder /var/www/mywwwabcfolder

The content is uploaded via mywww.abc.com and www.abc.com is used for general viewing. I have used domain access module where mywww.abc.com is an alais to mywww.abc.com

I want that all the files that are uploaded should be maintained in a common folder i.e. in /var/abcfolder/public/sites/all/files for both urls

I tried changing the file system path via admin/file-system to ../../abcfolder/public/sites/default/files since the path should be relative to the drupal installation folder. However on uploading a file, I get a file not found error.

Any help to resolve this issue would be appreciated?

Should I change the htaccess file in any one of the codebase? If yes, what should the change be?

Regards, Loveleen

1

1 Answers

1
votes

How about trying this:

Store the files in /var/www/abcfolder/sites/default/files. Create a symbolic link from /var/www/mywwwabcfolder/sites/default/files to /var/www/abcfolder/sites/default/files

Look up symbolic links in linux if you don't know what they are. If you're using windows you can still do symbolic links but they are more complicated.

[BTW I am not sure why you are doing this complicated setup. Reconsider using domain access unless you really need to. Is it necessary to have two sites like this? ]