aaPanel_Jose If we install composer in the site directory, it doesn't allow to run flarum install command, saying the directory isn't empty. So we have to install composer in any other directory
php composer-setup.php --install-dir=/www/composer
and run flarum installation with following command, while you are at /www/wwwroot/flarum/ [assuming you want to install flarum in flarum directory]
sudo php /www/composer/composer.phar create-project flarum/flarum . --stability=beta
Also we would need to update permissions
sudo chown -R www:www /www/wwwroot/flarum
Later we need to include /www/wwwroot/flarum/.nginx.conf file from flarum directory into nginx config.
include /www/wwwroot/flarum/.nginx.conf
We will also need to update root directory paths for flarum.
For instance
location / {
try_files $uri $uri/ /index.php?$query_string;
}
This does not work unless you update it to:
location /www/wwwroot/flarum {
try_files $uri $uri/ /www/wwwroot/flarum/index.php?$query_string;
}
And we need to change paths in index.php file which is located in public folder. We will need to move all files from public folder to flarum or root directory, and then run it. Otherwise installation doesn't proceed fine.
It is little complicated to setup flarum with nginx, however with apache we don't have to do much work arounds.