BoWeb Thanks is own local server
What is the operating system on that server? Depending on what operating system you run, the commands for installing and configuring Apache are likely to differ, as well as search paths to configuration files. So this is a vital piece of information you should provide us with for us to help you effectively.
BoWeb works fine with wordpress and phpBB forum as well
That doesn't mean it will work with Flarum with the push of a button. Not without some additional configuration. This only proves that your operating system is in good working condition. Flarum primarily depends on the web server (Apache in this case) and MySQL to be configured correctly. It also depends on some additional PHP extensions to be present, but those generally don't need any additional configuration.
BoWeb sorry but what that mean? if the same server works fine with other main stream php scripts, why should be extra configured and how? to work with flarum?
I didn't know you already had WordPress and phpBB installed and running on the same server. Thank you for providing that bit of detail. So that means that you're using Apache to serve several different PHP applications (WordPress and phpBB), and the configuration becomes more complicated. That's outside of my scope of knowledge and someone else with more experience and better understanding of Apache configuration may be better positioned to help you. But I can go over the installation guide here and break it down for you.
https://docs.flarum.org/install.html
Apache (with mod_rewrite enabled) or Nginx
Apache installed? Yes. Done. Do you have mod_rewrite enabled? I have no idea how this is done, but I can see a line in your configuration that says RewriteEngine on. Does this mean it's enabled? Someone else can fill me in here.
PHP 7.2.9+ with the following extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
Do you have all these PHP extensions installed and enabled?
MySQL 5.6+ or MariaDB 10.0.5+
Which one are you using and what version? This may be a vital piece of information.
Flarum includes a .htaccess file in the public directory – make sure it has been uploaded correctly.
Does this file exist in your public directory? (I mean the other one you moved its contents to.)
Flarum will not function properly if mod_rewrite is not enabled or .htaccess is not allowed.
I'm not exactly sure of what the difference between "not enabled" and "not allowed" is. I take it to mean something called mod_rewrite needs to be enabled and .htaccess is something else that needs to be allowed. Have you done that? Have you enabled one and allowed the other?
If you're managing your own server, you may need to add the following to your site configuration to enable .htaccess files:
<Directory "/path/to/flarum/public">
AllowOverride All
</Directory>
Yes, you're managing your own server by what I can tell ("local server"). And you already have a section like that in your configuration file:
<Directory /var/www/sub.domain.com/public_html>
AllowOverride All
</Directory>
I can't tell if this path is correct or not. Why did you move the files from public/ in the first place? Did you run into some other problem at first? I know you said:
BoWeb And site.php with index.php both edited as your docs.
But this is not a requirement to install Flarum. It is only required when you change the file and folder structure, and that is generally only needed when you don't have full control over the server. If you're running your own local server, you don't need to do this. Unless of course you want to, for some other reason.
By default Flarum's directory structure includes a public directory which contains only publicly-accessible files. This is a security best-practice, ensuring that all sensitive source code files are completely inaccessible from the web root.
This is the part where it gets tricky (at least for me). It says:
However, if you wish to host Flarum in a subdirectory (like yoursite.com/forum), or if your host doesn't give you control over your webroot (you're stuck with something like public_html or htdocs), you can set up Flarum without the public directory.
One thing that jumps out here is that it talks about installing or hosting Flarum in a "subdirectory". Whereas you want to host it in a subdomain. I don't think you're on the same page with your configuration. I'm not sure, I'm just pointing this out for you.
Simply move all the files inside the public directory (including .htaccess) into the directory you want to serve Flarum from. Then edit .htaccess and uncomment lines 9-15 in order to protect sensitive resources. For Nginx, uncomment lines 8-11 of .nginx.conf.
This is what you have done I think. But you may have done it for the wrong reason? Did you edit the .htaccess file that came with Flarum like it says you should (uncomment line 9-15)?
You will also need to edit the index.php file and change the following line:
$site = require './site.php';
Finally, edit the site.php and update the paths in the following lines to reflect your new directory structure:
'base' => __DIR__,
'public' => __DIR__,
'storage' => __DIR__.'/storage',
I know you said you edited index.php and site.php like it says, but I suggest you have a look at that again, you may have missed something. I'm assuming you still want to follow the "Customizing Paths" section, even though you don't need to if you have full control over your own server.