Installing Laravel on servers with DirectAdmin panel

Installing Laravel on servers with DirectAdmin panel:
Below is a very simple way to install on our servers with a directadmin panel.
System update and installation of necessary components:
Almalinux

dnf update
dnf install git curl

SeoHost.pl

About WordPress

apt-get update
apt-get install git curl

The next step is to download and transfer composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Laravel – Installation

We add the domain in the directadmin panel and log in to SSH and delete everything in the public_html directory, i.e. all the default DA files.

Example for the domain domain.pl

rm -rf /home/admin/domains/domena.pl/public_html/*

then we go to this directory:

cd /home/admin/domains/domena.pl/public_html/

to install Laravel we execute the command:

composer create-project --prefer-dist laravel/laravel

The next step is to assign user permissions

chown -R admin:admin /home/admin/domains/domena.pl/public_html/

We need to edit the default root of the web server and change it from public_html to public as per Laravel requirements.

We log in to da and go to the administrator level to the tab:
Our own HTTPD configurations and we choose our domain.

We set up docroot by pasting the path to our public directory

|?DOCROOT=/home/admin/domains/domena.pl/public_html/public|
We write it down and that's it ?

How useful this post was?

How useful this post was, to evaluate it!

How useful this post was 0 / 5. How useful this post was: 0

How useful this post was! How useful this post was.