torta Is the server managed ? If so there should be a setting in your panel to choose which domain is hosted in which directory, and to add new domains.
If not, what webserver is that ? You should have a look at virtualhosts for apache for example.
If you're on DigitalOcean it's likely they have a tutorial for that very thing in their community section. A Google search also usually returns those tutorials. There's no difference between Flarum and any other PHP app regarding that.