Magento 1and1 VPS Setup - Setting up the VPS settings

Magento 1and1 VPS Setup - Setting up the VPS settings

At this point it is assumed that a VPS Domain is properly setup.

Although the magento check : will return ok. The magento application will still not run. This is because it's required libraries will not be search by the current VPS setup. Remember we have created our domain, example DOMAIN_X this directory resides in:


Subdirectories include,

httpdocs - our directory root
conf - httpd.include and vhosts.conf
statistics - apache logs

In order for the magento library to be visible in our system we must edit the conf/httpd.include. In this file there are 2 instances of VirtualHost xml tag one is for administration (Plesk) and 1 is for our root directory something like this:

<VirtualHost x.x.x.x:x>

If you will look deeper you will see this tag

php_admin_value open_basedir "/var/www/vhosts/"

This tells us the location of our document root/web root.

Below this line (note there are 2 instances 1 for and the other is ) we should add:

php_admin_value include_path "
AllowOverride All

Discussion regarding this topic is available here:

This is a multiple entries but actually the format is: "domain1_lib1:domain1_lib2:", entries are separated via semicolon ":".

While you can customize, mostly admin values in httpd.include, all the others are customizable (your choice) either via vhost.conf or .htaccess

For example setting values and flags:

Let us set the maximum post and upload size for our root directory: /var/www/vhosts/ And display our errors.


post_max_size = 16M
upload_max_filesize = 16M
display_errors on

php_value post_max_size 16M
php_value upload_max_filesize 16M
php_flag display_errors on

In htaccess, take note of the difference between php_value and php_flag, value is for values (any - size(MB), etc) and flag is for boolean values (true/false).

Also, you should also take note that there are some tags that will not work on .htaccess and vhost.conf, for example these 2 famous lines in 1and1:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

If you insist to add these lines you will get an error in /var/www/vhosts/, something like tag not recognized.

After all the changes you have made restart your apache: there are several ways 2 do this:

1.) Login to Virtuzzo and restart httpd there
2.) Login to your vps server as root using putty and execute one of the following command:
a.) /etc/init.d/httpd restart
b.) /usr/sbin/apachectl start
c.) service httpd restart
Magento 1and1 VPS Setup - Setting up the VPS settings Magento 1and1 VPS Setup - Setting up the VPS settings Reviewed by czetsuya on Sunday, October 04, 2009 Rating: 5

1 comment:

sukumar said...

ya This post useful to megento eCommerce vendors.Magento eCommerce

Powered by Blogger.