Reputation: 343
I've got the same problem a lot of people seem to have, I've spent over 20 hours now researching this, and none of the solutions work. - I did a fresh clean install of magento 2 on a VPS server with all the right php extensions, etc. - and install goes great... hit home page and I get no CSS, same in admin area.
Everyone seems to say this is the solution, but it does not work. CSS/js Image Not showing after Magento 2 Installation.
First Reason: Permission of Your pub/Static Directory.
Remember You should do permission to files 644 and to the directory 755.
There must be three directory inside it. If not come to second Reason.
Second Reason: You need to deploy your static file by PHP Command line.
First You should navigate to root of the magento installation and run Command php bin/magento setup:static-content:deploy It will generate all necessary file to be loaded after successful running this Command change the file permission of the following directories to 755 pub/static/frontend/ pub/static/adminhtml pub/static/_requirejs
I have reinstalled magento, restarted web server, done everything, I am just floored that a fresh brand new clean install of Magento 2 straight from Magento is broken and cannot be fixed. I would expect it to at least work out of the box.
Any help would be tremendously appreciated, I really need this storefront up and I cant even get started. This is what it looks like when hitting the page:
This is what I get http://portraitsreno.com/error.jpg
Upvotes: 5
Views: 1053
Reputation: 1106
you just need to enable Apache modules
Go to Wamp / Xamp -> Apache -> Apache Modules -> rewrite_module
Hope this will help :)
Upvotes: 0
Reputation: 343
OK, so I have gotten this to function, but I know something is not right.
What I did was reinstall magento from scratch (about 20 times, LOL) - and finally ran:
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
which broke everything, then I ran a permissions 755 on EVERYTHING... and finally I can view the store, and the admin... and seems to function somewhat ok...
problem is, anything I do on the store, there's continual permissions issues going forward... example, I upload a logo through the admin, and the logo is a 404 if you try to view it from a browser, until I go in and browse to the pub folder with the images, and change permissions on the logo .png file. (same goes for every product image, every everything) certainly there has to be some better way of solving this? so I guess the first part of the question is answered, but now a different issue. About ready to scrap magento, as this is just too time consuming. It should not be this difficult out of the box. I would LOVE any suggestions from anyone
Upvotes: 0