This step assumes you have already followed these steps:
Below are the final steps (with slight modifications) in How To Install WordPress On Ubuntu 14.04 which allow for php mod rewrite:
move into the directory:
cd /var/www/html/site
change ownership properties, where user below is the user (e.g. root):
sudo chown -R user:www-data *
sudo chown -R :www-data /var/www/html/site/wp-content/uploads
To modify apache to allow URL rewrites:
sudo nano /etc/apache2/sites-available/000-default.conf
here we set the ServerName (e.g. localhost) and create a directory section where we allow overrides:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName server_domain_name_or_IP
<Directory /var/www/html/>
AllowOverride All
</Directory>
. . .
sudo a2enmod rewrite
sudo service apache2 restart
if there is not one already, create an .htaccess file:
touch /var/www/html/home/.htaccess
sudo chown :www-data /var/www/html/home/.htaccess
chmod 664 /var/www/html/home/.htaccess
Now in wordpress settings, we can got to ‘Settngs' > ‘Permalinks' and choose settings as necessary