如何在 EE2 中设置 MSM 的路径?
我正在 EE2 中使用 MSM 设置第二个站点。我已按照 EE 的说明进行操作,但当我尝试访问第二个站点中的主页时,我不断收到以下错误:
您的系统文件夹路径似乎设置不正确。请 打开以下文件并更正:index.php
第二个站点设置为子域,如下所示:
主站点:http ://174.121.46.122/~flowerwo/
子域名:http://174.121.46.122/~plants/
我尝试了服务器路径和网址,但没有成功:
$system_path = '/home/domain/public_html/system/';
我需要一些帮助。谢谢!
I am setting up a second site using MSM in EE2. I have followed the instructions from EE but I keep getting the following error when I try to access the home page in the 2nd site:
Your system folder path does not appear to be set correctly. Please
open the following file and correct this: index.php
The second site is set as sub-domain as follows:
main site: http://174.121.46.122/~flowerwo/
sub-domain: http://174.121.46.122/~plants/
I have tried a server path and a url with no success:
$system_path = '/home/domain/public_html/system/';
I could use some help on this. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ExpressionEngine 的 MSM (多站点管理器) 使用虚拟域效果最佳strong> 或子域 由同一服务器提供服务。
$system_path
变量的值取决于第二个域的文件相对于第一个域的位置。例如,如果您的目录结构如下所示:
那么您可以将
domain2.com
的$system_path
变量设置为:您的设置略有不同,因为您似乎是对您的域使用 Apache 的 UserDir 模块 而不是 虚拟主机指令。
我对这种相当奇怪的设置没有任何经验,但您可能只需要调整第二个域的
admin.php
和index.php
文件中的一些设置:该值可以是您的 ExpressionEngine 系统文件夹的相对路径或绝对路径,但某些服务器可能需要完整的绝对路径。
如果您想要一种万无一失的方法来确定每个 MSM 域的服务器路径,上传一个简单的 PHP 文件,名为将
phpinfo.php
放入每个域的根目录中:在浏览器中加载页面并查找以下变量:
该变量的值将是 PHP Info 脚本的完整路径:
删除
phpinfo.php
部分,添加系统文件夹的名称system
,这将是您的 MSM 域的路径:如果 ExpressionEngine 仍然有问题,您可能需要查看如果您的服务器有任何 PHP open_basedir 或PHP SafeMode 限制(这些设置将由您的网络托管服务商确定)。
ExpressionEngine's MSM (Multiple Site Manager) works best using virtual domains or subdomains served off the same server.
The value for your
$system_path
variable will depend where on how you have the second domain's files relative to the first domain.For example, if your directory structure looked like this:
Then you could set your
$system_path
variable fordomain2.com
as:Your setup is slightly different, since you appear to be using Apache's UserDir Module for your domains instead of VirtualHost Directives.
I don't have any experience with this rather odd setup, but you may just need to adjust a few settings in your second domain's
admin.php
andindex.php
files:The value can either be relative or absolute from your ExpressionEngine system folder, though some servers may require a full, absolute path.
If you want a bulletproof way of determining the server path for each of your MSM domains, upload a simple PHP file named
phpinfo.php
into the root of each domain:Load the page in your browser and look for the following variable:
The value of that variable will be the full path to your PHP Info script:
Remove the
phpinfo.php
part, add in the name of your system folder,system
, and that will be the path to your MSM domain:If ExpressionEngine still has problems, you might want to see if your server has any PHP open_basedir or PHP SafeMode restrictions in place (these settings will be determined by your web host).