1. Flush and Clear Magento Cache by Command line
php bin/magento cache:clean
rm -rf var/cache/*
rm -rf var/generation/*
2. Enable Rewrite mod and configure htaccess file
Modify from:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
to:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
3. Replace the URL
This:
http://localhost/index.php/adminUrl
With:
http://127.0.0.1/index.php/adminUrl
4. Restart apache server
I hope it helps