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?
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.:
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. =)
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?
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.
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.
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?
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).
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
// ------------------------------------------------------ // 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?
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:
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
// ------------------------------------------------------ // 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?
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.
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?
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.
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:
Thanks for all your (and the other tech’s) help with this. Also thanks for removing any system folder links I missed!
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.
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:
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.
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.
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!
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!
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.
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.