Start a Project

How to setup Bagisto on AWS

In this tutorial, we will learn how to install Bagisto on Ubuntu 20.04 LTS.

Bagisto is an E-Commerce framework built on top of the hottest open-source technologies such as Laravel, PHP framework, and Vue.js, a progressive Javascript framework.

It is suitable for all small or large E-Commerce business demands using a simple set-up procedure.
Built on top of Laravel and equipped with easy product information management.

Requirements to install Bagisto :

Step1: Install Apache2, MY SQL, PHP 8.1, and its modules

Before starting, the LAMP stack must be installed on your server. If not installed, you can install it using the following command:

STEP2: Once the LAMP stack is installed, edit the php.ini file and modify some default settings:

Change as like below config.

STEP3: Install the Composer

Most likely, you want to put the composer.phar into a directory on your PATH, so for that you can simply call composer from any directory (Global install), using for example:

STEP4: SSH User Creation

Presently, we were in our server’s root user, but due to security issues, we do not keep our application code in the directories of the root user. So, we have to create another SSH user for this.

Create an SSH user who will be the owner of the application code. I create an SSH user with the name “bagisto” You can pick any name you want.

Eventually, this prompts a password window where you can set the password. also, the remaining fields can be left empty using simply pressing the enter key

Additionally, after creating a user, we will switch to a new user.

STEP5: Download Bagisto using the command below:

After downloading, a directory name “bagisto” will be created inside the public HTML directory, then go to the public directory /bagisto. It is the directory that loads index.php.

STEP6: Apache configuration for Bagisto

However, to support the web pages we will configure apache and we need to switch again to the root user to configure apache

You have to define your Domain name and your DocumentRoot Path, after executing the above command.

Save it, and exit after this.

Furthermore, configure the envvars file using executing the below command:

And find these lines :

Modify the apache SSH username in this way :

configure apache2.conf file using the following command:

Now, you will find the block code shown below:

Modify it to the following code:

STEP7: Install MYSQL Server For Database

Case 1. If you are using Local Database Server

Creation using executing the following commands when a password Is asked after The below two commands, simply Press ENTER

Case 2: If you are using AWS RDS

Amazon RDS handles routine database tasks, such as provisioning, patching, backup, recovery, failure detection, and repair.

You do not need to worry about anything, everything is managed at the AWS end.

Firstly you have to launch an RDS and then configure it with your Ec2 instance

Follow the instructions below if you are using an AWS RDS:

STEP8: Bagisto configuration

Now, go to your Bagisto root directory and run the mentioned commands below and put the MySQL database in the .env filename.

Then enter the details and use the same credentials you get while creating a database.

Define your domain name and MySQL details in the .env file

STEP9: Run the following command in the root directory of bagisto

STEP10: Run the below commands to set the permission on the Bagisto root directory

Now, Go to the browser and hit your domain

Need Support?

Thank You for reading this Blog!

For further more interesting blogs, keep in touch with us. If you need any kind of support, simply raise a ticket at https://webkul.uvdesk.com/en/.

You may also visit our Bagisto development services and quality Bagisto Extensions.

For further help or query, please contact us or raise a ticket.

Exit mobile version