My first time installing Laravel Spark took several days. I hope these tips will make it easier for you.
wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
./install.sh
Enable Apache SSL when creating the server
apt update
apt upgrade -y
apt -y install lsb-release apt-transport-https ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php7.3.list
apt -y install php7.3
php -v
apt install php7.3-cli php7.3-fpm php7.3-json php7.3-pdo php7.3-mysql php7.3-zip php7.3-gd php7.3-mbstring php7.3-curl php7.3-xml php7.3-bcmath php7.3-json
apt install libapache2-mod-php7.3
a2enmod proxy_fcgi setenvif
a2enconf php7.3-fpm
systemctl reload apache2
apt install curl php-cli php-mbstring git unzip
curl -sS https://getcomposer.org/installer -o composer-setup.php
php composer-setup.php --install-dir=/usr/bin --filename=composer
composer global require laravel/installer
echo 'export PATH="$PATH:/home/captifi/spark-installer"' >> /etc/profile.d/spark.sh
echo 'export PATH="$PATH:~/.config/composer/vendor/laravel/installer/"' >> /etc/profile.d/laravel.sh
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/laravel/installer/"' >> ~/.bashrc
source ~/.bashrc
exit
apt autoremove
apt-get install git
cd /home/captifi
git clone https://github.com/laravel/spark-installer.git
cd spark-installer
composer install
curl -sL https://deb.nodesource.com/setup_10.x > setup_10.x
chmod +x setup_10.x
./setup_10.x
apt install nodejs
apt install build-essential libssl-dev
cd /home/captifi
spark new captifi-spark-team-billing --team-billing
Under Website options - change to /home/captifi/captifi-spark-team-billing/public
cd captifi-spark-team-billing
npm audit fix --force
a2dismod php7.0
a2enmod php7.3
service apache2 restart
Then go to Website Options in Virtualmin and change from FCGI to mod_php
chown captifi:captifi * -R
chown captifi:captifi /home/captifi/captifi-spark-team-billing/.[^.]*
chmod -R 775 storage
chmod -R 775 bootstrap/cache
ln -s /home/captifi/captifi-spark-team-billing/storage/app/public /home/captifi/captifi-spark-team-billing/public/storage
php artisan storage:link
cd /home/captifi
chown captifi:captifi * -R
Add your e-mail address to the $developers property in the App\Providers\SparkServiceProvider.
Then create a database and username/pass
mysql -u root
DROP USER 'root'@'localhost';
CREATE USER 'root'@'%' IDENTIFIED BY 'your-password';
GRANT ALL PRIVILEGES ON . TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
cd app/Providers
nano AppServiceProvider.php
Under boot() section, add:
Schema::defaultStringLength(191);
Also add this to top:
use Illuminate\Support\Facades\Schema;
nano .env and setup db name, user, pass
php artisan migrate