I am new to Magento 2 and was using composer to install it. Have already cloned the repo from Magento GitHub account.
One thing I couldn’t find information about was when installing Magento 2 on localhost do I need to place it under this docroot /var/www/magento2
or can it live outside this folder structure? Fro example just under magento2
?
6
Answers
You can place it anywhere on your system just update the Apache HTTP server configuration accordingly. The default docroot is
/var/www/html
or/srv/www/htdocs
depending upon your os distribution. And update the apache config file. For example for ubuntuIf you’re using Apache2, don’t change any setting and try to move the folder
magento2
in/var/www/html/public_html/
.Then, in your browser, go to
localhost/public_html/magento2
Depends wich folder you use to guide your domain. If you use mamp,wamp the easiest way is to directly put it in de www folder and unzip. Check you php versions and myql.
Typical setups are /var/www/html. This is dependent upon your vhost files, PHP and MySql setups.
/var/www/html
/opt/lampp/htdocs
After coming in the current directory run the composer command to install the magento :
After successful installation you can browse the url to open magento :
install-directory-name its may be magento2 or any other else.
Actually it really depends on your server configuration (Apache, Nginx).