This isn't an installation question, really (this is a server configuration question, for which there are much better resources out there), but I had a free moment.
https://linuxacademy.com/blog/linux/enabling-mod-rewrite-on-apache2/
a2enmod is just a move tool. So you can simply move the files manually from the current location to the mods-enabled folder. Your file structure might be different than what the article describes, so investigate before you blindly use commands, please.
If you have other troubles, this really isn't the place to discuss server setups. StackOverflow or the apache support site might be better options. Once you have your server working, we'd be happy to help you get Flarum setup.