In this video I will show how to setup wordpress permalinks on apache and fix 404 error.
You need to do 3 steps:
1. create .htaccess files in the root wordpress directory, chown www-data, chmod 660
2. add "AllowOverride All" to your virtual host configuration
3. enable rewrite module: a2enmod rewrite
12 янв 2017