Sorry to bump an old thread, but I'm having this issue on an Apache server.
Installation ran fine (via Composer), but I'm missing the .htaccess file (which I should have, according to the install guide). Is there any way to retrieve this manually?
I have already placed this in my apache2.conf (as per the install guide):
<Directory "/flarum">
AllowOverride All
</Directory>
Edit: So I managed to get this working by enabling mod_rewrite (doh!). Still a little weird I'm missing that .htaccess file though.
Edit 2: It appears the .htaccess was there after all, just hidden.
sudo nano .htaccess
This did the trick.