We can redirect our ‘localhost’ site to ‘localhost/blog’ on the server using the Apache Redirect Directive.
First, create/edit the .htaccess file in your web root directory. This is usually “/var/www/html”.
sudo pico /var/www/html/.htaccess
Add this line, replacing ‘example’ with your domain name and ‘blog’ with the directory you want to redirect to:
Redirect / http://example.com/blog
Now, all you need to do is restart apache2:
sudo /etc/init.d/apache2 restart
My thinkzinc.com server was updated to 20.04 from 18.04 and the wordpress install was failing. Apparently there were issues with Mysql. I tried many things; it was so frustrating that I actually left it alone for over a week. Today I decided to try to fix the issue. So many things on the net would not work but at last I did find a solution here. If you find yourself in the same situation, try this – it might help:
$ sudo systemctl stop apparmor.service
$ sudo update-rc.d -f apparmor remove
$ sudo apt-get remove --purge mysql-server mysql-client mysql-common
$ sudo apt-get autoremove
$ sudo apt-get autoclean
$ sudo apt-get install mariadb-server
$ sudo systemctl start apparmor.service
$ sudo update-rc.d apparmor defaults
*For the wordpress install, I was using the guide at ubuntu.com.