如何在 EE2 中设置 MSM 的路径?

发布于 2024-11-29 18:06:42 字数 497 浏览 1 评论 0原文

我正在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟凡古楼 2024-12-06 18:06:42

ExpressionEngine 的 MSM (多站点管理器) 使用虚拟域效果最佳strong> 或子域 由同一服务器提供服务。

$system_path 变量的值取决于第二个域的文件相对于第一个域的位置。

例如,如果您的目录结构如下所示:

└── domain1.com
    ├── admin.php
    ├── index.php
    ├── images
    ├── system
    └── themes
└── domain2.com
    ├── admin.php
    └── index.php

那么您可以将 domain2.com$system_path 变量设置为:

$system_path = '../domain1.com/system/';

您的设置略有不同,因为您似乎是对您的域使用 Apache 的 UserDir 模块 而不是 虚拟主机指令

我对这种相当奇怪的设置没有任何经验,但您可能只需要调整第二个域的 admin.phpindex.php 文件中的一些设置:

$system_path = '../flowerwo/system/';
$assign_to_config['site_name'] = 'plants';
$assign_to_config['site_url']  = 'http://174.121.46.122/~plants/';
$assign_to_config['cp_url'] = 'http://174.121.46.122/~plants/admin.php';

该值可以是您的 ExpressionEngine 系统文件夹的相对路径或绝对路径,但某些服务器可能需要完整的绝对路径。


如果您想要一种万无一失的方法来确定每个 MSM 域的服务器路径,上传一个简单的 PHP 文件,名为将 phpinfo.php 放入每个域的根目录中:

<?php phpinfo(); ?>

在浏览器中加载页面并查找以下变量:

_SERVER["SCRIPT_FILENAME"]

该变量的值将是 PHP Info 脚本的完整路径:

/home/domain/public_html/phpinfo.php

删除 phpinfo.php 部分,添加系统文件夹的名称 system,这将是您的 MSM 域的路径:

/home/domain/public_html/system

如果 ExpressionEngine 仍然有问题,您可能需要查看如果您的服务器有任何 PHP open_basedirPHP 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:

└── domain1.com
    ├── admin.php
    ├── index.php
    ├── images
    ├── system
    └── themes
└── domain2.com
    ├── admin.php
    └── index.php

Then you could set your $system_path variable for domain2.com as:

$system_path = '../domain1.com/system/';

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 and index.php files:

$system_path = '../flowerwo/system/';
$assign_to_config['site_name'] = 'plants';
$assign_to_config['site_url']  = 'http://174.121.46.122/~plants/';
$assign_to_config['cp_url'] = 'http://174.121.46.122/~plants/admin.php';

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:

<?php phpinfo(); ?>

Load the page in your browser and look for the following variable:

_SERVER["SCRIPT_FILENAME"]

The value of that variable will be the full path to your PHP Info script:

/home/domain/public_html/phpinfo.php

Remove the phpinfo.php part, add in the name of your system folder, system, and that will be the path to your MSM domain:

/home/domain/public_html/system

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文