1

I have a new local version of Magento2 and it all works and installs correctly.

The only thing that isn't working is the URL rewrites. I have an htaccess file in the root of the site.

Apache 2.4 - attached is my vhost file. (Maybe I need something else here?)

Mac El Capitan

<VirtualHost *:80>
        DocumentRoot /Users/brent/Sites/magento2/
        ServerName magento2.super-awesome-test.com
        <Directory  /Users/brent/Sites/magento2>
        Require all granted
        Options Includes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        </Directory>
        ErrorLog /Users/brent/Sites/magento2/logs/mage2-error.log
        CustomLog /Users/brent/Sites/magento2/logs/mage2-access.log common
</VirtualHost>
5
  • 1
    Do you have module rewrite enabled in Apache? Commented Dec 10, 2015 at 7:29
  • The command is a2enmod rewrite and you probably need to run it as root. Commented Dec 10, 2015 at 12:58
  • @SteveJohnson isn't a2enmod for Ubuntu? Commented Dec 10, 2015 at 13:45
  • I believe a2enmod is for Apache 2.4. If you can get Apache 2.4 to work on CentOS, I expect you'd have to set it. Commented Dec 15, 2015 at 14:10
  • I had mod_rewrite enabled, and adding the <Directory> in the vhost record worked for me - thx
    – dbcn
    Commented Nov 13, 2017 at 22:25

1 Answer 1

1

The problem was when I upgraded to El Capitan it overwrote my existing httpd.conf file and the mod_rewrite was commented out.

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

I uncommented it and Mod_Rewrite works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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