Install Laravel on a DirectAdmin Server

Install Laravel on a DirectAdmin Server

Laravel is an Open-Source PHP web framework for the development of web applications. Laravel framework includes dedicated dependency manager, utilities for application management and maintenance, different ways for accessing relational databases. As we all know that the PHP is the popular server scripting language around the world. Currently, the developers are building the complex websites and webapps, this might take much time from to start from the beginning. PHP frameworks have introduced the solution for this to help programmers. The Laravel framework has instant hosting and deployment system.

 

Let’s discuss few features of Laravel framework:

1) Authorization and Program Logic Technique

2) Blade Templating Engine

3) Different File Support

4) Security

5) Migration System Databases

 

Let’s discuss the steps to install Laravel framework on a Direct Admin server:

1) Login to your server via SSH as a root user and update your server to have everything well updated. Then install git and curl packages using yum utility using below commands.

# yum update

# yum install -y git curl

 

2) Install composer by using below commands, composer is a dependency manager for PHP through which we can install required libraries and dependencies you need for your project.

# curl -sS https://getcomposer.org/installer | php

# mv composer.phar /usr/local/bin/composer

 

3) Install the Laravel by following below commands; First, we need to remove the default files on the domain root folder created by the DirectAdmin and then switch to that directory;

# rm -rf /home/USERNAME/domains/LARAVEL_DOMAIN_NAME/public_html/*

# cd /home/USERNAME/domains/LARAVEL_DOMAIN_NAME/public_html/

PS: replace the USERNAME with the exact username and LARAVEL_DOMAIN_NAME with the domain name on which you need to install the projects.

 

4) Once done, install the Laravel using the Composer create-project tool.

# composer create-project –prefer-dist laravel/laravel  .

Once the installation completed, need to correct the ownership and permissions, for this just run below commands. Make sure to change USERNAME and LARAVEL_DOMAIN_NAME with the actual ones.

#chown -R USERNAME:USERNAME /home/USERNAME/domains/LARAVEL_DOMAIN_NAME/public_html/

 

5) Configure DirectAdmin to change the document root from public_html to public folder as required by Laravel. For that login to your DirectAdmin as admin user and click on “Custom HTTPD Configurations” link under the “Extra Features” section. Select your domain on which you have installed Laravel and on the new window, you should update the document root in the “Httpd.conf Customization for” area:

|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html/public|

Once done, click on ‘Save’ button to update the changes. That’s all, you have installed and Configured Laravel on your Direct Admin Server.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What virtualization software do you use?

We use Parallels Virtuozzo Containers (PVC).

Why is my VPS constantly crashing?

There are several causes to why you may not be able to access your VPS. Some users often mistake...

What kind of support do you offer?

We offer Fully Managed VPS packages. For a list of items that we support, please refer to the...

What kind of software can I install on my VPS?

As you have full root access, you may install any compatible software on your VPS. However, any...

What is Virtuozzo?

Virtuozzo is the VPS technology created by SWsoft which allow us to create isolated VPS servers...