尝试修改 Drupal 多站点的本地副本
我的 MAMP htdocs 目录中包含我网站的所有文件和数据库。
我目前面临一个问题,因为该网站没有设置“默认”网站文件夹,而是设置为“全部”(作为标准包含)和“example.com”网站域。
不幸的是,我需要访问它,但我无法访问它,因为它是从我的本地主机运行的。我正在使用 install.php 文件进入重定向循环。
我尝试将“example.com”文件夹更改为“localhost”,并显示网站,但主题数据仍在“example.com”文件夹结构中搜索资源。
我复制了“localhost”文件并将副本的名称返回到“example.com”,并且现在显示了网站,但这种设置肯定不理想,因为我有点搞砸了解决方法。
为了进一步了解 drupal 的工作原理,有人可以帮助我吗?如何停止在“example.com”目录中查找文件?
I've got all the files and the database for my website on my MAMP htdocs directory.
I'm facing an issue at the moment as the site isn't set up with a 'default' site folder, instead it's set up as 'all' (included as standard) and 'example.com' website domain.
Unfortunately I need to access this, but I'm unable to as it's running from my localhost. I was being entered into a re-direct loop with the install.php file.
I tried changing the 'example.com' folder to 'localhost' on a whim and the website displayed, but the theme data is still searching for resources within 'example.com' folder structure.
I duplicated the 'localhost' file and returned the name of the copy to 'example.com' and the website now displays, but this set up is certainly not ideal as I've kinda botched a workaround.
In an effort to understand how drupal works a little more, could somebody help me here. How do I stop the files looking in the 'example.com' directory?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定问题出在 Drupal 上,而是出在您自己的 Mamp 设置上。
如果您还没有准备好购买 Mamp Pro 的副本(它允许您创建各种域而不受“localhost”的限制),那么您必须考虑在 Apache 中设置虚拟主机。
像“虚拟主机 Mamp 教程”这样的网络搜索将帮助您找到相关教程。
当您能够设置特定的域名后,您在设置站点的本地副本时就不会有任何问题了。
I'm not sure the problem lies with Drupal, rather with your own Mamp setup.
If you're not ready to dish out for a copy of Mamp Pro, which would allow you to create various domains without being limited to "localhost", you'll have to look into setting virtual hosts in Apache.
A web search like "Virtual Hosts Mamp tutorials" will help you find relevant tutorials.
After you're able to set a specific domain name, you shouldn't really have any trouble with setting up a local copy of your site.