Magento Forum

   
Multisite under plesk! Finally
 
dosplus
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-08-14
 

After a lot of research, I finally got the error message to go away and the theme to magically appear!

I thought that it could benefit somebody else to know what I have done in order for multisite :

Note, this procedure assums that both domains are physically on the same server, but not into the same domain HTTPDOCS folder…

Meaning that the shops are running from one install and two different domain physical hosting location;

But onto the same server!  Did I say it, On the same server................

Step one:
Get domains names and create both domains onto plesk server hosting panel

Step two

Via SSH/FTP root access (Or via your hosting rep). You need to disable the base_dir inside the http.include file into the following directory for both sides of those domains, meaning in both domain config file:

/var/www/vhosts/yourdomain.com/conf/httpd.include

By doing the following into that file at the specified module tag (4 spots):

<IfModule sapi_apache2.c>
        
php_admin_flag engine on
        php_admin_flag safe_mode off
        
#php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/tmp"
    
</IfModule>

    <
IfModule mod_php5.c>
        
php_admin_flag engine on
        php_admin_flag safe_mode off
        
#php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/tmp"
    
</IfModule>


<
IfModule sapi_apache2.c>
        
php_admin_flag engine on
        php_admin_flag safe_mode off
        
#php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/tmp"
    
</IfModule>

    <
IfModule mod_php5.c>
        
php_admin_flag engine on
        php_admin_flag safe_mode off
        
#php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/tmp"
    
</IfModule>

*** Makes sure that the apache server is restarted after these modification by asking the rep to restartv or using the following command into an SSH/TelNet console:

service httpd restart

Step 3

Install Magento onto domain1.com httpdocs folder…
Now you should have a running Magento on http://www.yourdomain.com

Step 4

After installation, copy the following two files from httpdocs of domain1.com into the httpdocs folder of domain2.com, both files copied from the root location of the magento install of domain1.com httpdocs folder.

1- index.php
2- htaccess

Step 5
Modify the file index.php just copied into domain2.com at the following parameters (Like movie on Magento KB)

$mageFilename '/var/www/vhosts/yourdomain1.com/httpdocs/app/Mage.php';

Mage::run('YourStore2CodeHere''website');

Step 6
Into Magento console under --> SYSTEM --> MANAGE WEBSITES

Create your website desired…
Create any STORES desired…
Create any STORE VIEWS desired…

Step 7
Under the category tab,

Create a root category to be used with store # 2( domain2.com) // Into the default root cat

Step 8
Go under --> SYSTEM --> CONFIGURATION

Choose the store # 2 on the upper left and than the WEB tab on the left menu

Step 9
Setup the links as follow:

Base URL :  http://www.domain1.com
Base Link URL :  http://www.domain2.com
Theme URL:  {{unsecure_base_url}}skin/
Media base URL :  {{unsecure_base_url}}media/
Javascript base URL:  {{unsecure_base_url}}js/

Do the same for SSL secure URL links: (If used)

Base URL :  https://www.domain1.com
Base Link URL :  https://www.domain2.com
Theme URL:  {{unsecure_base_url}}skin/
Media base URL :  {{unsecure_base_url}}media/
Javascript base URL:  {{unsecure_base_url}}js/

Apply those setting under any store views created as well....

Step 10
Add products by checking the tickbox for the right website.

HOPE IT HELPS SOMEONE!!!!!!!!!!!!!!!!!!!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
setanta
Member
 
Total Posts:  33
Joined:  2007-11-01
 

Thanks very much for the info, I’m close but not there just yet!! My sites are hosted with mediatemple DV and when I ssh in to the conf folder it recommends not to chance the httpd.include files but rather to create a file called vhost.conf.

I have tried so many variations but to no avail, is it possible you can offer any suggestions, so I need to set this up in both domains?

<Directory "/var/www/vhosts/domain1.com/httpdocs">
php_admin_value open_basedir none
php_admin_value safe_mode off
</Directory>

<Directory "/var/www/vhosts/domain1.com/httpdocs">
<
IfModule sapi_apache2.c>
        
php_admin_flag engine on
        php_admin_flag safe_mode off
        php_admin_value open_basedir 
"/var/www/vhosts/domain1.com/httpdocs:/tmp"
    
</IfModule>

    <
IfModule mod_php5.c>
        
php_admin_flag engine on
        php_admin_flag safe_mode off
        php_admin_value open_basedir 
"/var/www/vhosts/domain1.com/httpdocs:/tmp"
    
</IfModule>
</
Directory>

Neither of htese work, am I not pointing to the correct folder to allw the second site to find app/mage.php?

 
Magento Community Magento Community
Magento Community
Magento Community
 
setanta
Member
 
Total Posts:  33
Joined:  2007-11-01
 

Thanks dosplus for pointing me in the correct direction it’s finally working!! So hopefully this might save someone else a painful experience.
My example is for running 2 websites from the same install of magento, on the same physical Media temple DV server.

First site, domain1.com (original magento install)

SSH to location:  /var/www/vhosts/domain1.com/conf
create file vhost.conf:

<Directory /var/www/vhosts/domain1.com/httpdocs>
php_admin_flag engine on
php_admin_value open_basedir none
</Directory>

Second site, domain2.com (containing only htaccess & index.php copied from original install)

SSH to location:  /var/www/vhosts/domain2.com/conf
create file vhost.conf:

<Directory /var/www/vhosts/domain2.com/httpdocs>
php_admin_flag engine on
php_admin_value open_basedir none
</Directory>

Now reconfigure all sites so the httpd.include files point to the relevant vhost.conf files by using this command;

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

Restart Apache:

/etc/rc.d/init.d/httpd restart

Final step is to change the index.php file in domain2.com to point to the first install.

line 26:  $mageFilename = ‘/var/www/vhosts/domain1.com/httpdocs/app/Mage.php’;
line 48:  Mage::run(’storename’, ‘website’);

 
Magento Community Magento Community
Magento Community
Magento Community
 
dosplus
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-08-14
 

Sorry ! I went away for a while, but Wowww! I am happy to see that it helped at least one person,…

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
dosplus
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-08-14
 

Hi, everyone.

My multisite works, I can see products, and descriptions etc....

But my problem lies under store 2, when i go under the product sheet or shopping cart in store 2, i get theme from store 1 and sometimes is refered to cart of store one… Any ideas why?

Anybody encountered this problem???

[SOLVED]

The theme interface was not setup right, make sure that

# 1 - Each store view are setup with the right interface and the right theme within that interface…

# 2 - Ensure that each products are pointed to the right theme/interface on their own setup sheet under >>> customisation

[\SOLVE]

Martin

 
Magento Community Magento Community
Magento Community
Magento Community
 
opalu
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2007-12-14
seabush, germany
 

Thank you!
a lot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
WhoIsGregg
Member
 
Total Posts:  64
Joined:  2008-09-02
Tampa, Florida
 

Don’t ever edit the http.include file—Plesk will overwrite that whenever it restarts. All your changes must be made to vhost.conf and vhost_ssl.conf then you restart plesk and it incorporates those changes into the http.include file.

I also posted some notes from my “Plesk Multisite Adventures” here:

http://www.magentocommerce.com/boards/viewthread/15003/#t59595

 
Magento Community Magento Community
Magento Community
Magento Community
 
dosplus
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-08-14
 

OK Guys, I made a mistake by saying http_include.

The above statment is true… and vhost.conf should be the prefered choice always.

SO, in plesk just do what is said above to go with the removal of the base_dir restrictions.

CHEERS!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mootrealm
Sr. Member
 
Avatar
Total Posts:  150
Joined:  2007-09-14
San Francisco, CA
 

@ setanta

When I use your method I get a redirect loop.

I do have a MT DV.

 
Magento Community Magento Community
Magento Community
Magento Community
 
SaveInstant
Member
 
Avatar
Total Posts:  31
Joined:  2008-11-17
Calgary
 

can someone please help me in making multistore work for subdomain.

main website is located at : /var/www/vhosts/mainwebsite.com/httpdocs

subdomain (mall) when hosted by plesk get created at: /var/www/vhosts/mainwebsite.com/subdomains/mall/httpdocs

I copied “.htaccess” and “index.php” from main store to subdomain location, however following modification in “index.php”

$mageFilename = ‘/var/www/vhosts/SaveInstant.com/httpdocs/app/Mage.php’;

and after creating vhost.conf for both mainwebsite and subdomain

gave following error while accessing http://mall.mainwebsite.com

“Unable detect system directory: report”

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1077
Joined:  2008-07-16
London, United Kingdom
 

hi there,

did you manage to resolve the error you had. “Unable detect system directory: report”

brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
SaveInstant
Member
 
Avatar
Total Posts:  31
Joined:  2008-11-17
Calgary
 

look for “how to remove open base directory restrictions”

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1077
Joined:  2008-07-16
London, United Kingdom
 

thanks ill check it out

regards
brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
dagreat
Jr. Member
 
Total Posts:  11
Joined:  2009-12-08
 

Thanks!! This was very helpful. I also found that I had to go into admin/system/configuration section and change the cookie domain in web/Session Cookie Management section of my second store.

 
Magento Community Magento Community
Magento Community
Magento Community
 
quark
Member
 
Total Posts:  60
Joined:  2007-12-15
Romania
 

I also have problems with Mahento 1.4.1.0 on Linux Plesk: http://www.magentocommerce.com/boards/viewthread/199677/
You succeeded to install Magento multi-site on Plesk server? Please let us know the procedure. Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top