Laravel fits well on an Ubuntu VPS with PHP-FPM and Nginx (or Apache). Minimal path: dependencies, create-project, then storage permissions.
Steps
Install PHP, common extensions and Composer:
sudo apt updatesudo apt install -y php-cli php-fpm php-mbstring php-xml php-curl php-zip unzipcurl -sS https://getcomposer.org/installer | phpsudo mv composer.phar /usr/local/bin/composerCreate the project:
cd /var/wwwsudo composer create-project laravel/laravel my-appFix ownership and permissions on storage and bootstrap/cache:
sudo chown -R www-data:www-data /var/www/my-appsudo chmod -R ug+rwx /var/www/my-app/storage /var/www/my-app/bootstrap/cachePoint the Nginx document root to /var/www/my-app/public and wire PHP-FPM.
Tips
- Copy .env, generate APP_KEY and configure the database.
- Run queue workers and the scheduler (cron) in production.
ext step
eed a VPS ready for PHP and Nginx? Deploy on Xernode.