I'm trying to install Magento 2 using the Laravel Homestead project. Laravel Homestead provides a virtual machine based around nginx. I have nginx successfully serving Magento 2 application pages. However, nginx is not serving static asset files. They all 404.
curl -I 'http://magento-php7.dev/static/frontend/Magento/luma/en_US/mage/calendar.css' HTTP/1.1 404 Not Found Server: nginx/1.9.9 Date: Wed, 03 Feb 2016 22:13:29 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive X-Frame-Options: SAMEORIGIN
I think what's happening in nginx is skipping the
pub/static/.htaccess file that makes the static asset serving application work. If I make a direct call to the URL that
pub/static/.htaccess redirect to, the asset serves successfully
Does anyone know how to get this working? This page on the nginx wiki makes it sound like nginx doesn't support .htaccess -- but the root
.htaccess/mod_rewrite is working fine. (it may be homestead is providng magic for this -- I just don't know nginx well enough to know)