+91 88 00 563434 [email protected] Blog open-book Knowledge Base

Find Solutions in Our Knowledge Base

Install Laravel on a DirectAdmin Server

You are here:
Sharing is Caring

Set up Laravel on a DirectAdmin Server

Laravel is an Open-Supply PHP net framework for the event of net purposes. Laravel framework consists of devoted dependency supervisor, utilities for software administration and upkeep, alternative ways for accessing relational databases. As we all know that the PHP is the most well-liked server scripting language around the globe. Presently, the builders are constructing the complicated web sites and webapps, this might take a lot of time to begin from the start. PHP frameworks have launched the answer for this to assist programmers. The Laravel framework has immediate internet hosting and deployment systems.

 

Let’s talk about some options of Laravel framework:

1) Authorization and Program Logic Method

2) Blade Templating Engine

3) Various File Support

4) Safety

5) Migration System Databases

 

Let’s discuss the steps to put in 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 properly updated. Then set up git and curl packages using yum utility using the below instructions.

# yum replace

# yum set up -y git curl

 

2) Set up composer by using the below instructions, 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/native/bin/composer

 

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

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

# cd /residence/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, must correct the ownership and permissions, for this just run the below instructions. Make sure to change USERNAME and LARAVEL_DOMAIN_NAME with the exact ones.

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

 

5) Configure DirectAdmin to change the document root from public_html to a public folder as required by Laravel. For that, log in to your DirectAdmin as an admin user and click on the “Customized HTTPD Configurations” link under the “Additional Options” 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 the ‘Save’ button to update the changes. That’s all, you have installed and Configured Laravel on your Direct Admin Server.

 

If you need any further assistance, please do reach our support department.

 

 


Sharing is Caring

Leave a Comment

Table of Contents