For VPS and SERVERS
Always I installed the websites like this: /home/domain.com/public_html
(In public_html; where the pages/scripts live)
But now with flarum, something new happens (for me). Their /public folder.
By intertia I installed composer/flarum here: /home/domain.com/public_html
so, after install I get this path: /home/domain.com/public_html/public
The thing is that now if I want to access to the flarum-forum... I have to go to www.domain.com/public instead www.domain.com (as always I used to go)
My goal is access to forum through the domain.com (without public subfolder)
I have been reading different options in this forum so my question here is ¿which is the best method?
.
.
.
1. Moving all files from public_html/public
to public_html
and change few config-files
(Customizing paths indications here: https://flarum.org/docs/install.html#customizing-paths )
2. Install flarum outside public_html
For example on/home/domain.com/flarum
and then rename the folder /public
by /public_html
, and finally, move it to /home/domain.com/public_html
. Now just change paths values on index.php
,flarum
and config.php
so at the end you will get:
/home/domain.com/flarum
(the files script)
/home/domain.com/public_html
(the public folder/files forum access trough domain.com)
3. Change DocumentRoot path on Apache configuration (httpd.conf)
Maybe is fastest way. Don't touch nothing of flarum and simply change DocumentRoot in the httpd.conf (apache)
Replace DocumentRoot /home/domain.com/public_html
for DocumentRoot /home/domain.com/public_html/public
or
Replace DocumentRoot /home/domain.com/public_html
for DocumentRoot /home/domain.com/flarum/public
.
.
.
Which of these 3 options do you think is the correct/better way?