Laravel sur VPS
Prérequis
apt install nginx php8.2-fpm php8.2-mysql php8.2-xml php8.2-mbstring php8.2-curl php8.2-zip composer gitDéploiement
cd /var/www\ngit clone https://github.com/user/app.git\ncd app\ncomposer install --no-dev --optimize-autoloader\ncp .env.example .env\nphp artisan key:generate\nphp artisan migrate\nphp artisan config:cache\nphp artisan route:cacheNginx
server {\n listen 80;\n server_name votredomaine.ca;\n root /var/www/app/public;\n index index.php;\n location / { try_files $uri $uri/ /index.php?$query_string; }\n location ~ \.php$ {\n fastcgi_pass unix:/run/php/php8.2-fpm.sock;\n fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n include fastcgi_params;\n }\n}Permissions
chown -R www-data:www-data /var/www/app\nchmod -R 755 storage bootstrap/cache
Cet article vous a-t-il été utile?
Articles similaires