0

I installed MAMP on a MAC PRO.

I then successfully installed magento 2.

The Homepage works. However none of the other pages seem to work. They all returns a

Not Found
The requested URL /magentotwo/customer/account/create/ was not found on this server.

I presume this might have something to do with the module-rewrite of apache etc.

i did place the following in my apache

httpd.conf :

NameVirtualHost *:80

<VirtualHost *:80>
ServerName magento.com
DocumentRoot /Applications/MAMP/htdocs/magentotwo
</VirtualHost>

EDIT;

when i place an index.php after the base url it works; i.e

http://localhost:8888/magentotwo/index.php/customer/account/create/

However, i am still not able to log into admin. so this does not work:

http://localhost:8888/magentotwo/index.php/admin

i am also not able to change my host address to just:

http://localhost/magentotwo/index.php/customer/account/create/

Is there something else that needs to done in MAMP/htaccess files for mamp that i am missing i am missing.

I previously used WAMP the pages worked by default.

SECOND EDIT---

i tried the following but it still does not work:

in my config i placed the following httpd.conf : NameVirtualHost *:80

ServerName magento.dev
DocumentRoot /Applications/MAMP/htdocs/magentotwo
<Directory "/Applications/MAMP/htdocs/magentotwo">
    AllowOverride All
    Allow from all  
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
    </IfModule>
</Directory>
</VirtualHost>

i then sudo vi into my host files and changed local host i,e

sudo vi /etc/hosts

and then changed

127.0.0.1 localhost magento.dev

i then tried to access site at

http://magento.dev/

and

https://localhost/magento.dev/

but nothing appears

error message; 
This site can’t be reached localhost refused to connect.
  • try using following url /magentotwo/index.php/customer/account/create/ – Aman Alam Dec 11 '18 at 12:02
  • also drop your localhost full url is it something like this "localhost/magentotwo" – Aman Alam Dec 11 '18 at 12:04
  • @AmanAlam. hi. the localhost/magentotwo does not work. however when i placed the index.php it does work. so. is my problem to do with the htaccess file. i have edited my question to reflect the change – theSeeker Dec 11 '18 at 12:07
  • problem is your apache rewrite_module is not enabled please check it – Aman Alam Dec 11 '18 at 12:10
  • Next please enable Search Engine Optimization option from admin->store->configuration->general->web->Search Engine Optimization->YES – Aman Alam Dec 11 '18 at 12:13
0

Here is the possible solution for your problem:

Solution 1:

<VirtualHost *:80>
ServerName magento.com
DocumentRoot /Applications/MAMP/htdocs/magentotwo
<Directory "/Applications/MAMP/htdocs/magentotwo">
    AllowOverride All
    Allow from all  
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
    </IfModule>
</Directory>
</VirtualHost>

Solution 2: Check Search Engine Optimization option enabled in admin or not. To check it you can check this step Admin->Store->Configuration->General->Web->Search Engine Optimization->YES

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.