To get more info on the 500 error, check Apache's error logs. Usually they're stored in /var/log/apache2/error.log. You can use the following command to print the last 30 lines of that file:
sudo tail -n 30 /var/log/apache2/error.log
I'm going to guess that the Rewrite module isn't enabled. If that's the case, enable it and restart Apache:
sudo a2enmod rewrite
sudo systemctl restart apache2
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.