2 个 drupal 实例尝试访问同一组文件
我已经设置了 2 个 drupal 实例,指向 2 个代码库,其中一个公共数据库
- www.abc.com 指向文件夹 /var/www/abcfolder
- mywww.abc.com 指向文件夹 /var/www/mywwwabcfolder
内容通过 mywww.abc.com 上传,www.abc.com 用于一般查看。我使用了域访问模块,其中 mywww.abc.com 是 mywww.abc.com 的别名
我希望所有上传的文件 都应保存在 < strong>common 文件夹 即在 /var/abcfolder/public/sites/all/files 中两个网址
我尝试通过 admin/file-system 将文件系统路径更改为 ../。 ./abcfolder/public/sites/default/files 因为该路径应该相对于 drupal 安装文件夹。但是,在上传文件时,我收到文件未找到错误。
任何解决此问题的帮助将不胜感激?
我应该更改任一代码库中的 htaccess 文件吗?如果是,应该改变什么?
问候, 洛夫林
I have set up 2 drupal instances pointing 2 codebase with a common database
- www.abc.com points to folder /var/www/abcfolder
- 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试一下如何:
将文件存储在 /var/www/abcfolder/sites/default/files 中。创建从 /var/www/mywwwabcfolder/sites/default/files 到 /var/www/abcfolder/sites/default/files 的符号链接
如果您不知道它们是什么,请在 linux 中查找符号链接。如果您使用的是 Windows,您仍然可以进行符号链接,但它们更加复杂。
[顺便说一句,我不知道你为什么要做这个复杂的设置。除非确实需要,否则请重新考虑使用域访问。有必要有两个这样的网站吗? ]
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? ]