Laravel installation on servers with the panel DirectAdmin
In internetach hard to find and more recently the need arose installation laravel below a very simple way to install on our servers with the panel DirectAdmin.
Update your system and install the necessary components:
1 2 | yum update yum install git curl |
The next step is to download and transfer Composer
1 2 | curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer |
Laravel – Installation
Add the domain panel DirectAdmin and log on ssh and delete everything in public_html or all default files DA.
Example domain domena.pl
1 | rm -rf /home/admin/domains/domena.pl/public_html/* |
then go to this directory:
1 | cd /home/admin/domains/domena.pl/public_html/ |
laravel to install and use the command:
1 | composer create-project --prefer-dist laravel/laravel |
The next step is to give the user permissions
1 | chown -R admin:admin /home/admin/domains/domena.pl/public_html/ |
We have to edit the default root directory of the web server and change it to public_html to the public in accordance with the requirements of laravel.
We can log in and go to administrator-level tab:
HTTPD own configurations and choose our domain.
Set docroot pasting the path to our public directory
1 | |?DOCROOT=/home/admin/domains/domena.pl/public_html/public| |
We write down and that's it 🙂