Check the server logs to see what the error message is.
If one of those line is causing the issue, maybe you've got an Apache module missing.
That's strange though, because they are supposed to disable modules.
I don't understand what you mean by " the links dont work" ? Does the Flarum app boot ? What is not working then ?