Learn Magento Multi Store on 1and1 Vps Package Domains
What you need: Money - to buy package and domains from 1and1 What we have is a VPS III Package from 1and1 that comes with a default MX do...
https://www.czetsuyatech.com/2010/10/web-magent-multi-store.html
What you need:
Money - to buy package and domains from 1and1
What we have is a VPS III Package from 1and1 that comes with a default MX domain (.net)
What we've done:
1.) register a domain domain1.com
2.) installed magento in it: I think I have the steps here:
http://czetsuya-tech.blogspot.com/2009/10/how-to-setup-magento-system-in-1and1_04.html
3.) once done register another domain, domain2.com, where the second store will be installed
4.) do this on the first store
http://www.magentocommerce.com/blog/comments/from-the-support-team-multi-site-domain-name-setup/
5.) we need to modify some files in the server that are not editable via plesk so we need to login remotely
login on putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and
winscp (http://winscp.net/eng/index.php) using the root account
6.) copy index.php and .htaccess from domain1.com
a.) we need to change 3 things in index.php
i.) $compilerConfig -> '/var/www/vhosts/domain1.com/httpdocs/app/Mage.php';
ii.) $mageFilename -> '/var/www/vhosts/domain1.com/httpdocs/includes/config.php';
You know what that does mean right? Points to magento base installation
iii.) set the website -> Mage::run('store2', 'website');
Now everythings setup, but usually the server will give this error:
'/var/www/vhosts/domain.com/httpdocs/app/Mage.php' not found
The culprit is line 47 of index.php:
//if (!file_exists($mageFilename))
It always return false if safe mode is on. It usually is, because by default domain2 should not really be accessing the contents from domain1. Logical right?
Go to winscp and open the file: /var/www/vhosts/domain2.com/conf/http.include, and look for the instance of:
php_admin_flag safe_mode (http://php.net/manual/en/features.safe-mode.php) on -> set it to off
If /var/www/vhosts/domain2.com/conf/vhost.conf does not exist create it and add the following lines:
copy vhost.conf, paste in the same directory and rename to vhost_ssl.conf, for ssl connection.
Sample http.include
Money - to buy package and domains from 1and1
What we have is a VPS III Package from 1and1 that comes with a default MX domain (.net)
What we've done:
1.) register a domain domain1.com
2.) installed magento in it: I think I have the steps here:
http://czetsuya-tech.blogspot.com/2009/10/how-to-setup-magento-system-in-1and1_04.html
3.) once done register another domain, domain2.com, where the second store will be installed
4.) do this on the first store
http://www.magentocommerce.com/blog/comments/from-the-support-team-multi-site-domain-name-setup/
5.) we need to modify some files in the server that are not editable via plesk so we need to login remotely
login on putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and
winscp (http://winscp.net/eng/index.php) using the root account
6.) copy index.php and .htaccess from domain1.com
a.) we need to change 3 things in index.php
i.) $compilerConfig -> '/var/www/vhosts/domain1.com/httpdocs/app/Mage.php';
ii.) $mageFilename -> '/var/www/vhosts/domain1.com/httpdocs/includes/config.php';
You know what that does mean right? Points to magento base installation
iii.) set the website -> Mage::run('store2', 'website');
Now everythings setup, but usually the server will give this error:
'/var/www/vhosts/domain.com/httpdocs/app/Mage.php' not found
The culprit is line 47 of index.php:
//if (!file_exists($mageFilename))
It always return false if safe mode is on. It usually is, because by default domain2 should not really be accessing the contents from domain1. Logical right?
Go to winscp and open the file: /var/www/vhosts/domain2.com/conf/http.include, and look for the instance of:
php_admin_flag safe_mode (http://php.net/manual/en/features.safe-mode.php) on -> set it to off
If /var/www/vhosts/domain2.com/conf/vhost.conf does not exist create it and add the following lines:
php_value post_max_size 16M php_value upload_max_filesize 16M php_admin_value safe_mode_include_dir "/var/www/vhosts/domain1.com/httpdocs" php_admin_value open_basedir "/var/www/vhosts/domain2.com/httpdocs:/var/www/vhosts/domain1.com/httpdocs:/tmp"
copy vhost.conf, paste in the same directory and rename to vhost_ssl.conf, for ssl connection.
Sample http.include
<IfModule mod_ssl.c> <VirtualHost YOUR_IP:YOUR_PORT> ServerName YOUR_DOMAIN:YOUR_PORT ServerAlias www.YOUR_DOMAIN UseCanonicalName Off SuexecUserGroup YOUR_ADMIN psacln ServerAdmin ocantos@sbcglobal.net DocumentRoot /var/www/vhosts/YOUR_DOMAIN/httpdocs CustomLog /var/www/vhosts/YOUR_DOMAIN/statistics/logs/access_ssl_log plesklog ErrorLog /var/www/vhosts/YOUR_DOMAIN/statistics/logs/error_log <IfModule mod_userdir.c> UserDir /var/www/vhosts/YOUR_DOMAIN/web_users </IfModule> ScriptAlias /cgi-bin/ /var/www/vhosts/YOUR_DOMAIN/cgi-bin/ Alias /plesk-stat /var/www/vhosts/YOUR_DOMAIN/statistics/ <Location /plesk-stat/> Options +Indexes </Location> <Location /plesk-stat/logs/> Require valid-user </Location> Alias /webstat /var/www/vhosts/YOUR_DOMAIN/statistics/webstat Alias /webstat-ssl /var/www/vhosts/YOUR_DOMAIN/statistics/webstat-ssl Alias /ftpstat /var/www/vhosts/YOUR_DOMAIN/statistics/ftpstat Alias /anon_ftpstat /var/www/vhosts/YOUR_DOMAIN/statistics/anon_ftpstat Alias /awstats-icon /var/www/html/awstats/icon SSLEngine on SSLVerifyClient none SSLCertificateFile /usr/local/psa/var/certificates/cert-FrgoNn <Directory /var/www/vhosts/YOUR_DOMAIN/httpdocs> <IfModule mod_perl.c> <Files ~ (\.pl$)> SetHandler perl-script PerlHandler ModPerl::Registry Options ExecCGI allow from all PerlSendHeader On </Files> </IfModule> <IfModule sapi_apache2.c> php_admin_flag engine on php_admin_flag safe_mode off php_admin_value open_basedir "/var/www/vhosts/YOUR_DOMAIN/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/YOUR_DOMAIN/httpdocs:/tmp" </IfModule> <IfModule mod_fcgid.c> <Files ~ (\.fcgi)> SetHandler fcgid-script Options +FollowSymLinks +ExecCGI </Files> </IfModule> SSLRequireSSL Options -Includes +ExecCGI </Directory> <Directory /var/www/vhosts/YOUR_DOMAIN/web_users> <IfModule sapi_apache2.c> php_admin_flag engine off </IfModule> <IfModule mod_php5.c> php_admin_flag engine off </IfModule> </Directory> Include /var/www/vhosts/YOUR_DOMAIN/conf/vhost_ssl.conf </VirtualHost> </IfModule> <VirtualHost YOUR_IP:80> ServerName YOUR_DOMAIN:80 ServerAlias www.YOUR_DOMAIN UseCanonicalName Off SuexecUserGroup YOUR_ADMIN psacln ServerAdmin "ocantos@sbcglobal.net" DocumentRoot /var/www/vhosts/YOUR_DOMAIN/httpdocs CustomLog /var/www/vhosts/YOUR_DOMAIN/statistics/logs/access_log plesklog ErrorLog /var/www/vhosts/YOUR_DOMAIN/statistics/logs/error_log <IfModule mod_userdir.c> UserDir /var/www/vhosts/YOUR_DOMAIN/web_users </IfModule> ScriptAlias /cgi-bin/ /var/www/vhosts/YOUR_DOMAIN/cgi-bin/ Redirect permanent /plesk-stat https://YOUR_DOMAIN/plesk-stat Redirect permanent /webstat https://YOUR_DOMAIN/webstat Redirect permanent /webstat-ssl https://YOUR_DOMAIN/webstat-ssl Redirect permanent /ftpstat https://YOUR_DOMAIN/ftpstat Redirect permanent /anon_ftpstat https://YOUR_DOMAIN/anon_ftpstat Redirect permanent /awstats-icon https://YOUR_DOMAIN/awstats-icon <IfModule mod_ssl.c> SSLEngine off </IfModule> <Directory /var/www/vhosts/YOUR_DOMAIN/httpdocs> <IfModule mod_perl.c> <Files ~ (\.pl$)> SetHandler perl-script PerlHandler ModPerl::Registry Options ExecCGI allow from all PerlSendHeader On </Files> </IfModule> <IfModule sapi_apache2.c> php_admin_flag engine on php_admin_flag safe_mode off php_admin_value open_basedir "/var/www/vhosts/YOUR_DOMAIN/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/YOUR_DOMAIN/httpdocs:/tmp" </IfModule> <IfModule mod_fcgid.c> <Files ~ (\.fcgi)> SetHandler fcgid-script Options +FollowSymLinks +ExecCGI </Files> </IfModule> Options -Includes +ExecCGI </Directory> <Directory /var/www/vhosts/YOUR_DOMAIN/web_users> <IfModule sapi_apache2.c> php_admin_flag engine off </IfModule> <IfModule mod_php5.c> php_admin_flag engine off </IfModule> </Directory> Include /var/www/vhosts/YOUR_DOMAIN/conf/vhost.conf </VirtualHost>Sample vhost.conf
<Directory /var/www/vhosts/YOUR_DOMAIN/httpdocs> php_value post_max_size 16M php_value upload_max_filesize 16M php_value allow_url_include off php_admin_value open_basedir "/var/www/vhosts/YOUR_DOMAIN/httpdocs:/var/www/vhosts/YOUR_BASE_DOMAIN/httpdocs:/tmp" </Directory>Sample vhost_ssl.conf
<Directory /var/www/vhosts/YOUR_DOMAIN/httpdocs> php_value post_max_size 16M php_value upload_max_filesize 16M php_value allow_url_include off php_admin_value open_basedir "/var/www/vhosts/YOUR_DOMAIN/httpdocs:/var/www/vhosts/YOUR_BASE_DOMAIN/httpdocs:/tmp" </Directory>
Post a Comment