Yucho Serv00无法切换网站根目录,只能删除public_html文件夹,然后将别的目录链接到public_html,不过亲测这样Flarum会报错。 好在Flarum官方文档中给出了解决方案,参见:[链接登录后可见]
Yucho #3 may 啊?英文文档不是和我说的一样? 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. 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. If you intend to install Flarum using one of the archives, you can simply use the no-public-dir (Public Path = No) archives and skip the rest of this section. If you’re installing via Composer, you’ll need to follow the instructions below.