I seen this is a solution for most of the problems, my question is where is .htaccess file?
and the default root fold for magento is var/www/html/magento/ ? is that were all of the other files were installed and this .htaccess file has to go?
I'm running Magento2 - Apache2/MariaDB/Php7.1 on Ubuntu Server 18.04 installed with composer in default directory. ( var/www/html/magento/ )
I did all recommended but all of it is not working in my case.
Check the value in core_config_data web/unsecure/base_url if correct.
NOTE: should the same as the folder name and CASE SENSITIVE.
Mine is okay now.
4 years later and that was the ONLY thing after an hour trying all the things I have found online that actually works, Thank you very much!