Magento2 no CSS after a clean install and nothing works

I have the same problem as many people, I spent more than 20 hours studying this, and none of the solutions work. - I did a fresh clean install of magento 2 on a VPS server with all the correct php extensions, etc. - and the installation is going fine ... click on the main page and I don’t get CSS, same thing in the administration area.

Everyone seems to be saying that this is a solution, but it does not work. CSS / js Image Does not appear after installing Magento 2.

First time: resolving your pub / static directory.

Remember that you must do permission to 644 files and to 755 directory.

It should have three directories. If you do not come to the second reason.

Second time: you need to deploy your static file using the PHP command line.

First you have to go to the root of the magento installation and run the php bin / magento setup command: static-content: deploy All the necessary file will be generated, which will be loaded after this command successfully runs, change the file resolution of the following directories to 755 pub / static / interface / pub / static / adminhtml PUB / static / _requirejs

I reinstalled magento, restarted the web server, did everything, I just did that the new clean installation of Magento 2 directly from Magento was broken and could not be fixed. I would expect it to at least work out of the box.

Any help would be greatly appreciated, I really need this store, and I can't even get started. Here's what it looks like when you hit the page:

This is what I get http://portraitsreno.com/error.jpg

+5
source share
2 answers

Ok, so I got this to function, but I know something is wrong.

What I did was reinstall purple from scratch (about 20 times, LOL) - and finally ran:

to find. -type d -exec chmod 770 {} \; && to find. -type f -exec chmod 660 {} \; && chmod u + x bin / magento

which broke everything, then I ran permissions 755 on EVERYTHING ... and finally, I can look at the store, and the administrator ... and it seems to be working fine ...

The problem is that everything I do in the store constantly has problems with access rights ... For example, I upload the logo through the administrator, and the logo - 404, if you try to view it from the browser until I go to the folder pub with images and change permissions on the .png file. (the same goes for every product image, every everything), of course, should there be some better way to solve this? therefore, I think the first part of the question is answered, but now another problem. About the finished disposal magento, because it is too much time. It should not be difficult. I would LOVE any suggestions from anyone

0
source

you just need to enable apache modules

Go to Wamp / Xamp -> Apache -> Apache Modules -> rewrite_module 

Hope this helps :)

0
source

Source: https://habr.com/ru/post/1241318/


All Articles