After installed the magento 2, all css,js and images were not loaded correctly and return 404 error
This can be caused by file and directory permissions. You can set directory’s permission to 755 and file permission to 644
You can use following command to set directory’s permission as 755
find . -type d -exec chmod 755 {} \;
and use following command to set file’s permission as 644
find . -type f -exec chmod 644 {} \;
From
Find
const WRITEABLE_DIRECTORY_MODE = 0770;
and change to
const WRITEABLE_DIRECTORY_MODE = 0755;
Also find
const WRITEABLE_FILE_MODE = 0660;
and change to
const WRITEABLE_FILE_MODE = 0644;
After that you should re deploy by following command from your Magento 2 directory
php bin/magento setup:static-content:deploy