You are on page 1of 3

During the installation process Magento will set cookies and most browsers will refuse to accept cookies

for localhost. This can lead to several problems but no error messages. E.g. when trying to set the locale the page will just refresh and revert to the standard En-US locale.. To avoid this problem, you can set up Magento to use 127.0.0.1 as its domain name or create another entry for localhost in your computers /etc/hosts file and use that hostname to access the site, as shown below: 127.0.0.1 localhost www.localhost.com PHP memory You may encounter problems when displaying product images if your memory limit is too low. If you plan to upload high resolution images I would recommend setting memory_limit = 512M in your php.ini

Apache Virtual Hosts in Ubuntu in 5 easy steps


Posted on | By:

In this tutorial Ill walk you through setting up 3 Apache virtual hosts running on a single Ubuntu server. An Apache virtual host, as explained by Apache, refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be IP-based or namebased. By default, Ubuntu already has this capability enabled, so things are much easier to configure these days. Enough with the intro, this is how you do it:

We are going to create 3 sites, site1.com, site2.com and site3.com 1. Create the folders that will host your new sites. By default, Apache in Ubuntu serves from /var/www. So create these:
view source print ?

1.mkdir /var/www/site1 2.mkdir /var/www/site2 3.mkdir /var/www/site3

2. Copy the current default setting found in /etc/apache2/sites-available/default and name it the same as your new site.
view source print ?

1.cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site1 2.cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site2 3.cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site3

3. Edit the new config files for each site using your preferred text editor. Add the line ServerName server1 right below the ServerAdmin line and change both DocumentRoot and Directory to point to your new sites. This is what it should look like (youll do exactly the same for each of your 3 new sites, repeat this step for as many new sites as youll be creating): /etc/apache2/sites-available/site1

view source

print

01.<VirtualHost *:80> 02.ServerAdmin webmaster@localhost 03.ServerName site1 04. 05.DocumentRoot /var/www/site1 06.<Directory /> 07.Options FollowSymLinks 08.AllowOverride All 09.</Directory> 10.<Directory /var/www/site1/> 11.Options -Indexes FollowSymLinks MultiViews 12.AllowOverride All 13.Order allow,deny 14.allow from all 15.</Directory> 16. 17. 18.ErrorLog ${APACHE_LOG_DIR}/error.log 19. 20.# Possible values include: debug, info, notice, warn, error, crit, 21.# alert, emerg. 22.LogLevel warn 23. 24.CustomLog ${APACHE_LOG_DIR}/access.log combined 25. 26.</VirtualHost>

4. After you have edited the config files for each of the 3 or how many virtual hosts you are creating, just tell Apache to start serving the new domains and stop serving the default:
view source print ?

1.sudo a2ensite site1 2.sudo a2ensite site2 3.sudo a2ensite site3 4.sudo a2dissite default

5. Now reload apache and you should be able to get to each of your new domains:
view source print ?

1.sudo /etc/init.d/apache2 reload

Congratulations, you have done it, 3 sites running off of the same Apache server. Hopefully this tutorial helped you. Thank you for stopping by and please share with others, after all, code should be free. - See more at: http://www.foscode.com/apache-virtual-host-ubuntu/#sthash.d2ZPUsym.dpuf

PHP Extensions "0" must be loaded.

f you are installing magento version 1.7.0.1 try this to solve your issue Replace in file app/code/core/Mage/Install/etc/config.xml (near 71th string) this <extensions> <pdo_mysql/> </extensions> with this <extensions> <pdo_mysql>1</pdo_mysql> </extensions>

Alternate
mkdir demo cd demo wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento1.7.0.2.tar.gz wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sampledata-1.6.1.0.tar.gz tar -zxvf magento-1.7.0.2.tar.gz tar -zxvf magento-sample-data-1.6.1.0.tar.gz mv magento-sample-data-1.6.1.0/media/* magento/media/ mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql mv magento/* magento/.htaccess . chmod o+w var var/.htaccess app/etc chmod -R o+w media mysql -h localhost -u oneie_oneie -p100ppneoc oneie_demo < data.sql chmod 755 mage ./mage mage-setup .

You might also like