Day by day I am losing hope with magento 2 installation. I am very much stuck for the past 6 months with the simple installation step. But I find no notes about the installation for ubuntu 14.4 LTS. I will list down the steps for the installation which I have made till now.
System information check before installation (in command line terminal shell):
------------------
1)php -v
PHP 5.6.22-1+donate.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
2)mysql --version
mysql Ver 14.14 Distrib 5.6.30, for debian-linux-gnu (i686) using EditLine wrapper
3)sudo a2enmod rewrite
Module rewrite already enabled
4)apache2 -v
Server version: Apache/2.4.20 (Ubuntu)
Server built: 2016-04-20T00:00:00
5)composer -V
Composer version 1.0.3 2016-04-29 16:30:15
6)lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
7)host path is “http://localhost”
Installation steps:
I have changed the .htacess for subfolder. Even then the sub pages and admin pages does not works. It throws 404 for found. But when I give a /index.php/ then the page renders. For the same /index.php/admin the admin pages throws the same 404 with key as a url maganto2/admin/admin/index/index/key/98fd68bed0f5cb7f617e063d12c717b7778663ec71ad9458290283839bb03fa0/
The 1.x installation story was simple. I used to extract to whatever subfolder I wanted. When clicked it simply installed what I needed. But for v2 I don't know why the installation is complicated..!! Am I the only one who is facing the issue?
you need to follow the instructions as below
1) Create a .htaccess file into your root directory can follow the given URL :
https://github.com/magento/magento2/blob/2.0.4/.htaccess
2) After creating run the following command to restart your apache server
sudo /etc/init.d/apache2 restart
3) Also check the permission for var directory inside the root folder or run the following command to set permission :
sudo chmod 777 -R var/
4) Clen the cache
sudo php bin/magento cache:clean
Hope it would work for you
A couple items:
-Chuck
Hi SindreM,
Thanks for the help. But I do have mod_rewrite listed under "Loaded Modules".
Hi ipragmatech,
Thanks for the help.I do have .htaccess aleady in the folder. I also cleared cache by sudo php bin/magento cache:clean and chmod /var. But still it does not work for sub links and admin link
Hi Magento_Chuck,
Thanks for the help. I dont have httpd.conf in my Ubuntu 14.4 LTS. So I created a vhost inside by following
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/"file name.conf"
Inside that set the following
<VirtualHost *:80>
ServerAdmin xxx@gmail.com
ServerName migrate.localhost
DocumentRoot /var/www/html/migrate/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/html/migrate/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
cd /etc/apache2/sites-available/
sudo a2ensite file name.conf
sudo service apache2 restart
sudo gedit /etc/hosts
Add: 127.0.0.1 sitename.localhost
sudo service apache2 restart
After this if I give http :// sitename.localhost The magento loades with home page. But again the sub pages does not work. I used to do the same vhost creation for zf2, laravel, cakePHP ect which does works. I even tried to create a simple vhost to check if it works and it does works.
I have also changed "chmod -R www-data:www-data" but still I could not make the sub pages and admin to work.
I wonder if anyone could take up the environment to test the same.