I have tried many of the solutions from: Local installation of Magento 2 doest not generate files in the pub/static folder and similar posts:
I am in developer mode (verified in command line, and I can see error messages on the page for php). I am running Nginx with php-fpm from a 16.04 Ubuntu in vmware.
So far I've tried:
chmod -R 777on the
chown -R www-data:www-dataon the
pubfolders, I've also tried them as owned by
tried the suggestion about changing from Symlink to Copy in
pub/static/.htaccessI can verify exist and are correct
So I go to the browser (and my browser has cache disabled in network tab) and load a frontend or admin page and none of the
pub/static file stuff is generated, the page loads but with no css, js, etc.
If I delete the
pub/static I can re-generate them with
php bin/magento setup:static-content:deploy and that works fine, but the issue is that anytime I make a change to a template file or js file, I have to delete
pub/static and run that command which is very slow and not practical for development. So my questions are:
Could this have to do with how I have the owner and group of the Magento files? I am not sure how that should be. It seems like php-fpm runs as
www-databut I'm not 100% sure about that, I am not good with linux.
Could it have to be with the user that I use when running
php bin/magento setup:static-content:deploy? Which user should that be in command line? Usually I run it as
root. But as I mentioned, I've manually changed the pub and var folders and files to
www-databut it doesn't help.
Or maybe it has to do with how I have the Mage Root set? I'm using the default
nginx.conffile included, and have mage root set like:
set $MAGE_ROOT /var/www/html/magento2;(my magento 2 files and folders are in that directory)