1 of 2
1
MSM Setup on Plesk Control Panel?
Posted: 16 November 2007 12:47 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi there,

I’ve got a dedicated server (running Plesk control panel) with a single IP address, and have just installed EE with the Multiple Site Manager for mywebsite.com.

I’m just trying to get my head around how the MSM needs to work in my situation so wanted some guidance on this please?

I have the following domain names:

mywebsite.com (main site)
mywebsite2.com
mywebsite3.com

So far, I just have the main site setup with EE and the MSM. By the way, I simply point mywebsite.com at the IP address of the server and once I have added the domain via my Plesk control panel, the website hosting is set up.

When it comes to adding in mywebsite2.com, how should I proceed with this - should I setup a Domain Alias of mywebsite2.com for mywebsite.com, then rely on the path.php files to make the 2nd website work?  Or should I manually create a new folder within the httpdocs folder of mywebsite.com to ‘host’ the mywebsite2.com files?

If I added a second domain in the normal way, I think the folders of the domain would be completely seperate, e.g.:

/var/www/vhosts/domains/mywebsite.com/httpdocs
/var/www/vhosts/domains/mywebsite2.com/httpdocs
/var/www/vhosts/domains/mywebsite3.com/httpdocs

I have read the documents but still can’t quite suss this out.

Thanks for any advice,

Ste

Profile
 
 
Posted: 16 November 2007 12:49 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  36398
Joined  05-14-2004

Greetings, Ste,

You can find the EE instructions here:

http://expressionengine.com/docs/cp/sites/domainsetup.html

What that essentially means is that all your sub-domains must be able to access the main system folder. 

Are you asking for assistance with configuring the actual server for this? If so, I’ll move this up to how-to as we can not help with server configuration.  Let me know. =)

 Signature 
Profile
MSG
 
 
Posted: 16 November 2007 03:33 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi Lisa,

Thanks for this.  I have read that help page quite a few times but still can’t get my head around what goes in the ‘mywebsite2’ folder other than the path and index files mentioned on the help page?  I’d understand more if I was supposed to install EE in this folder too, but realise that the MSM means that it only needs to be installed in the main site’s folder.

If I’m clear about what this ‘mywebsite2’ and ‘mywebsite3’ folders need to do, then my I can ask for the right help from my server administrators.  For example, I need to get my domain host to point http://www.mywebsite2.com to my server’s IP address, then I need to liaise with my web host to get everything setup on their servers to point this to the correct place.

In the sort of setup I mention above, where should http://www.mywebsite2.com be pointed?  In the main sites httpdocs folder, or within httpdocs/mywebsite2/ folder?

Thanks,

Ste

Profile
 
 
Posted: 16 November 2007 03:56 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  16147
Joined  04-29-2002

Ste, I use CPanel, not Plesk.

But here’s a real example:

I have my main domain, shetakespictures.com

Beneath the main domain, I have two other directories called mdp and captive for

mydigitalpictures.com
captivatedbythelight.com

See the image below for directory shots.

Image Attachments
stp.jpg
Click thumbnail to see full-size image
 Signature 

Most Recent version: 1.6.7 Build 20090515 If needed, also update your forum EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 16 November 2007 04:21 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Thanks for that Sue, and the picture is a great help.

I’ll take it to the web host and let them deal with this from here! wink

I’ll post back how I get on as I noticed one or two other posts on the forums with queries from people also using Plesk.

Thanks,

Ste

Profile
 
 
Posted: 16 November 2007 10:41 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  338
Joined  01-20-2006

Also of note, many plesk servers have open_basedir restrictions in place, which gets in the way of a simple MSM setup. You can generally edit your httpd.conf files for your domain to allow certain open_basedir configurations. But I’m not a .conf genius. Some others here might help you out as well.

 Signature 

AJ Penninga
Pretty Squares, LLC - http://www.prettysquares.com

Profile
 
 
Posted: 17 November 2007 07:00 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

What you say AJP is more or less what our server support said:

Accomplishing what you require is very difficult in a plesk environment. It is possible, but difficult to maintain. In php, what is preventing your scripts from accessing data outside of the domains document root is the php variable open_basedir. Segmentation is a design point in plesk and an essential part of php security. Because of this, plesk creates all domains with a restrictive open_basedir value, only allowing php scripts to access the document root and the temp directory.

It is possible to override this value in the vhost.conf, however, this can only be modified by hand, and it would have to modified each time you created a domain. Adding the vhost.conf to a skel file is not an option because the directory path will vary from domain to domain.

With that said, I can show how to do this, however, you would be responsible for making the changes as you add new domains.

Please respond with the following:

What domain do the other domains need to access?
Do the scripts need rw permissions?

I’m not too worried about maintaining it as adding each domain to the MSM will be no small deal to us, so editing another file with certain values should be a relatively infrequent job.  We anticipate having anywhere from 5-20 websites over the next 12 months or so.

By the way, I assume there’s no limit to how many sites we can run using the MSM as long as we pay the license fees?

Finally, I assume that read/write access is required, as per the server admin’s query above?  Can anyone confirm this please?

If I can get this working I’ll add the details to a Wiki or KB article (or via EE Admins) for others who may be using Plesk.

Thanks,

Ste

Profile
 
 
Posted: 18 November 2007 11:18 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  24513
Joined  05-20-2002

A writeup would be much appreciated.  And yes- you’ll need rw on some files/folders.  And there’s no inherent limit on the number of MSM sites- but just to be sure, how many are we talking about here?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 19 November 2007 05:26 AM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi Robin,

We were thinking of up to around 20 sites in total.

I’ll be sure to do a write-up of this once I get it working.  I seem to be having path issues though, so wonder if you knew of any further debugging exercises that could help pin-point this?

Here’s the last two reples from my server admin:

The following should be done as the root user, so login under the primary account then “su -” supply the root password.

In order to allow the mysite1.com domain access to the mymainwebsite.com domain I have added the following into /var/www/vhosts/mysite1.com/conf/vhost.conf (This didn’t exist before hand).

<Directory /var/www/vhosts/mysite1.com/httpdocs>
php_admin_value open_basedir “/var/www/vhosts/mymainwebsite.com/httpdocs:/var/www/vhosts/mysite1.com/httpdocs:/tmp”
</Directory>

As you can see this is a : separated list of allowed directories for access from /var/www/vhosts/mysite1.com/httpdocs/

After this has been added I issued the following so that the config file was re-parsed for use in Apache:

# /usr/local/psa/admin/bin/websrvmng -a

Then to make Apache re-read its configuration:

# /etc/init.d/httpd graceful


For info, the basic break down of plesk structure is as follows:

/home/httpd/vhosts/domain/httpdocs

So, if you are calling that file from inside of the httpdocs directory of mysite1.com domain, the relative path would be:

../../mymainwebsite.com/httpdocs/system/

After all this, I’m getting an error when trying to access mysite1.com: “The system path does not appear to be set correctly. Please open your path.php file and correct the path.”

Here’s my path.php contents:

<?php

// ------------------------------------------------------
// DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO

// ------------------------------------------------------
// Path to the directory containing your backend files

$system_path = "../../mymainwebsite.com/httpdocs/system/";

// ------------------------------------------------------
// MANUALLY CONFIGURABLE VARIABLES
// See user guide for more information
// ------------------------------------------------------

$site_name = "my_site1";
$template_group = "";
$template = "";
$site_url = "";
$site_index = "";
$site_404 = "";
$global_vars = array(); // This array must be associative

?>

Do you have any more ideas on this before I go back to the server admin for some troubleshooting?  Or any ideas for pin-point the issue and checking whether the access to the main domain is even working?

Thanks,

Ste

Profile
 
 
Posted: 19 November 2007 07:54 AM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi there,

Just to follow this up, I’ve asked the server admin to confirm that the relative path I was using is correct to the main site’s system folder.  Here’s his response:

I can verify that the relative path is correct:

[root@141530-web1 httpdocs]# pwd
/home/httpd/vhosts/mysite1.com/httpdocs
[root@141530-web1 httpdocs]# cd ../../mymainwebsite.com/httpdocs/system/
[root@141530-web1 system]# pwd
/home/httpd/vhosts/mymainwebsite.com/httpdocs/system
[root@141530-web1 system]#

What is the error itself that it is throwing? Is it just saying the path is incorrect? or is there more to the error code?

Additionally, I have modified the vhost.conf a bit to explicitly state it has access to the system directory. Please let me know if you are still having problems.

I’ve also updated the path.php file:

<?php

// ------------------------------------------------------
// DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO

// ------------------------------------------------------
// Path to the directory containing your backend files

$system_path = "../../../mymainwebsite.com/httpdocs/system/";

// ------------------------------------------------------
// MANUALLY CONFIGURABLE VARIABLES
// See user guide for more information
// ------------------------------------------------------

$site_name = 'my_site1';
$template_group = "";
$template = "";
$site_url = "http://www.mysite1.com/";
$site_index = "index.php";
$site_404 = "";
$global_vars = array(); // This array must be associative

?>

Can EE think of anything else I can check here to help pin-point the issue I’m having?

If I can’t get this working soon, I’ll need to go ahead and start working on a standalone website.  Is it easy to start on a standalone website and bring it into the MSM later?

Thanks,

Ste

Profile
 
 
Posted: 19 November 2007 09:16 AM   [ Ignore ]   [ # 10 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  24513
Joined  05-20-2002

Hm…  OK- try the full server path instead.  See if that matters.  If it doesn’t help- then let’s see if we can get a better error.  Open up your index.php file- switch error reporting to E_ALL:

error_reporting(0);
to
error_reporting
(E_ALL);

And toward the bottom, let’s remove error supression:

if ( ! @include($system_path.'core/core.system'.$ext))
{
    
exit("The system path does not appear to be set correctly.  Please open your path.php file and correct the path.");    
}

Change to
if ( ! include($system_path.'core/core.system'.$ext))

And yes- I’m guessing a bit here, but let’s see what happens.

Also- importing an existing site into an MSM setup isn’t the way I’d go if I could possibly avoid it.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 19 November 2007 09:51 AM   [ Ignore ]   [ # 11 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi Robin,

Thanks for this suggestion.  I’ve just made the changes and now get the following:

Warning: include() [function.include]: SAFE MODE Restriction in effect. The script whose uid is 10003 is not allowed to access /var/www/vhosts/mymainwebsite.com/httpdocs/system/core/core.system.php owned by uid 10004 in /var/www/vhosts/mysite1.com/httpdocs/index.php on line 119

Warning
: include(/var/www/vhosts/mymainwebsite.com/httpdocs/system/core/core.system.php) [function.include]: failed to open stream: Inappropriate ioctl for device in /var/www/vhosts/mysite1.com/httpdocs/index.php on line 119

Warning
: include() [function.include]: SAFE MODE Restriction in effect. The script whose uid is 10003 is not allowed to access /var/www/vhosts/mymainwebsite.com/httpdocs/system/core/core.system.php owned by uid 10004 in /var/www/vhosts/mysite1.com/httpdocs/index.php on line 119

Warning
: include(/var/www/vhosts/mymainwebsite.com/httpdocs/system/core/core.system.php) [function.include]: failed to open stream: Inappropriate ioctl for device in /var/www/vhosts/mysite1.com/httpdocs/index.php on line 119

Warning
: include() [function.include]: Failed opening '/var/www/vhosts/mymainwebsite.com/httpdocs/system/core/core.system.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhosts/mysite1.com/httpdocs/index.php on line 119

I’m seeing permission issues but wasn’t sure whether these were due to the code I’ve just added or whether this the break-through we need?  I wonder if you could take a look at these before I go back to the server admin?

Thanks,

Ste

Profile
 
 
Posted: 19 November 2007 10:02 AM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  24513
Joined  05-20-2002

Yep- safemode is the problem.  Right now- the subsites can’t access the system folder files.  I THINK if you give the host the error, they should be able to help you out.  Also- I’m going to edit your paths so the system folder name doesn’t show.

But yep- let them know the subsites can’t access the folder- and it’s required that they do so- see:

The directory you specify must be able to have files within it be able to access your main installation system directory. You should ensure you don’t have any “open_basedir” or other restrictions in place which could prevent this.

Think we’re getting close.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 19 November 2007 12:18 PM   [ Ignore ]   [ # 13 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi Robin,

It now works, thanks!  I’ve just turned Safe Mode off myself via the Plesk control panel and I’m now seeing a test template for this site.

For info, it was the absolute server path that worked (the relative paths failed to work for me no matter how many or few ‘../’ were in front of the address:

$system_path = "/var/www/vhosts/mymainwebsite.com/httpdocs/system/";

Thanks for all your (and the other tech’s) help with this.  Also thanks for removing any system folder links I missed! wink

All the steps taken to get this working are listed in this post but I’ll repeat them for adding a 2nd site to the MSM and come back with a clear and concise step-by-step guide.

Thanks,

Ste

Profile
 
 
Posted: 27 December 2007 01:10 PM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  22
Joined  08-26-2007

Hi.  I too am setting up MSM on a Plesk server where my primary domain with EE installed is hosted on a single IP.  I am getting an error after moving the path.php and index.php files and after editing the path.php file with the correct server path where the backend files are stored:

$system_path = "/var/www/vhosts/myoriginaldomain.com/httpdocs/system/index.php";

When I go to the new domain, my error message currently complains about the system path being incorrect, but at one point it said “disallowed file extension.”

I have read this thread completely, and it seems like it is possible to use MSM with Plesk, but I am unsure of what I need to do next to get it working, despite the apparent open_basedir restrictions.

Do I need to contact my host for further help?

Profile
 
 
Posted: 28 December 2007 04:44 AM   [ Ignore ]   [ # 15 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

Hi there,

First of all, you definitely need your web host’s assistance with this - in my case, everything that was done to get this working okay (and I do have it working okay now) was carried out by them.

I’ve listed the actions carried out in this thread (i.e. changing the open_basedir value, editing the vhost.conf file, turning php safe mode off, etc), though they are in a bit of a hap-hazard manner.  I will write up a KB article on the exact step-by-step instructions that are used when I set this up (via my web host) with another domain.

However, the first thing I notice is that I didn’t include index.php in my own path - get rid of this.

My own path in the ‘sub-site’ looks like this:

$system_path = "/var/www/vhosts/mymainwebsite.org.uk/httpdocs/system/";

I reckon that will get past your disallowed file type error message.

Good luck!

Ste

Profile
 
 
Posted: 28 December 2007 09:11 AM   [ Ignore ]   [ # 16 ]  
Summer Student
Total Posts:  22
Joined  08-26-2007

Thank you so much, Ste.  People like you are what keep me doing this!  I am in contact with my host, who is coaching me in performing all of these steps mySELF.  I am a little over my head here, but I’m a pretty smart cookie, so I expect to get it ironed out soon.

Thanks for the info on the system path thingy too.  Too many details here for one little mommy!

smile

Profile
 
 
Posted: 28 December 2007 09:28 AM   [ Ignore ]   [ # 17 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  390
Joined  05-15-2007

No problems - after all the posts I’ve made on these forums, it’s the least I can do to try and help someone else now and again! wink

If you can be coached into performing these steps yourself, then you’ll be further ahead than me!  I’m still bracing myself for that particular lesson off my web host. smile

Thanks,

Ste

Profile
 
 
Posted: 02 January 2008 11:55 AM   [ Ignore ]   [ # 18 ]  
Summer Student
Total Posts:  22
Joined  08-26-2007

Hello again.  I have followed the instructions exactly and still get the same system path message.  I turned on error reporting and got none.  I then followed my host’s recommendation to enable pear, which was very very similar to the commands i entered in SSH that were mentioned above.  I still hit a dead end.  This is so frustrating! I am 99 percent sure I am doing this correctly, but I still can’t get my site to appear.

Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 77517 Total Logged-in Users: 38
Total Topics: 101528 Total Anonymous Users: 23
Total Replies: 544286 Total Guests: 273
Total Posts: 645814    
Members ( View Memberlist )