Install the stack
sudo apt update
sudo apt install nginx mysql-server php8.3-fpm php8.3-{mysql,mbstring,xml,curl,zip,gd,bcmath,intl} unzip
Upload & configure
cd /var/www && sudo unzip product.zip -d mysite
cd mysite && cp .env.example .env
php artisan key:generate
sudo chown -R www-data:www-data storage bootstrap/cache
Nginx server block
server {
server_name example.com;
root /var/www/mysite/public;
index index.php;
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.3-fpm.sock; }
}
SSL
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d example.com
Was this article helpful?
