cancel
Showing results for 
Search instead for 
Did you mean: 

404 on fresh install on OS X with MAMP

404 on fresh install on OS X with MAMP

I have installed latest magento locally on os x with MAMP using composer and brew with apache. Site loads but with a 404. If I add index in the url: http://localhost:8888/magento/index.php it loads correctly, however admin gives me a 404 regardless. For me to come to this point, i had to change the root .htaccess file to 

 

RewriteEngine on
RewriteCond %{REQUEST_URI} !^pub/
RewriteCond %{REQUEST_URI} !^/setup/
RewriteCond %{REQUEST_URI} !^/update/
RewriteCond %{REQUEST_URI} !^/dev/
RewriteRule .* pub/$0 [L]
DirectoryIndex index.php

If I keep the slash for the Rewriterule I get 

 

The requested URL /pub/ was not found on this server.

I also tried to copy the .htaccess file from /pub  (or using the .htacess.sample file) to root along with the index.php file, but then i get 

 

localhost is currently unable to handle this request.
HTTP ERROR 500

I added the site in my host file under etc/hosts:

 

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
127.0.0.1	magento 
255.255.255.255	broadcasthost
::1             localhost

 and in /apache2 i created a sites-available folder and in there I added a magento.conf file: 

 

<VirtualHost *:80>
ServerName localhost:8888
ServerAdmin webmaster@localhost
DocumentRoot /Applications/MAMP/htdocs/magento/pub

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory "/Applications/MAMP/htdocs/magento">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>

And I have tried about everything I cand find when it comes to permssion, recomplie, flushing cache etc, but I cant get this to work. 

 

Any ideas?