0

Why do we have to install Magento 2 in Magento2 folder. Cannot we install Magento on root. How should i work on the ownership of Magento, if i install Magento 2 on root directory.

PS: If i install my Magento2 (127.0.0.1/Magento2) inside a folder, is it possible to run Magento on 127.0.0.1 instead of 127.0.0.1/magento2

  • Yes you can run your magento on 127.0.0.1 but for this you need to setup virtual host on Apache which will be represent 127.0.0.1 to your magento directory. Check this link how to create virtual host : in.godaddy.com/help/… – Kumar M Mar 30 '17 at 6:14
  • TY, what about Magento Folder Permissions ? – Mek Mar 30 '17 at 6:16
  • You just need to do one thing 644 permission for all file and 755 for all folders, excluding pub and var. For pub and var you can use 777 or 775 . – Kumar M Mar 30 '17 at 6:20
  • is this independent of the user system, as mentioned in the magento docs. I am using dedicated server. – Mek Mar 30 '17 at 6:31
  • @Mek, You can redirect from 127.0.0.1/magento2 to 127.0.0.1 using .htaccess. Check the below link to change the .htaccess file. magento.stackexchange.com/a/148340/45181 – Venu Joginpally Mar 30 '17 at 7:06
1

You can install magento anywhere you want on the server. The only thing you need to do is to define root folder in apache or nginx configuration so the server would search index.php file in the correct folder. So in order for you to use only 127.0.0.1 without /magento is to change vhost configuration. For nginx you need to set something like

root /var/www/magento2/pub;

For apache something like

DocumentRoot "/var/www/magento2/pub"
  • Thanks, i need to just add DocumentRoot "/var/www/magento2/pub" in http.conf, what about the permissions of folder. How do i set them. I am using a dedicated server – Mek Mar 30 '17 at 6:15
  • Just to add to it, magento is running on shared server (very slow) but not working on dedicated – Mek Mar 30 '17 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.