Admin & Web Application Environment Configuration
Explore detailed guidance and instructions of 6amMart environment configuration, ensuring seamless operation and performance of your eCommerce platform.
Introduction & Requirements
This guide walks you through the step-by-step setup and configuration of the 6amMart Admin Panel and Web application. Ensure your environment matches the required specifications before beginning.
| Component | Requirements |
|---|---|
| Admin & Web (V4.0) | PHP 8.3 or higher, MySQL 5.7 or higher, Laravel 12 |
| Mobile App (V4.0) | Android Studio latest, Flutter SDK (version 3.44.2 Stable), JDK 17, Xcode 26.2 for IPA build |
| For React (V4.0) | Node.js v16.8 or higher, Npm / Yarn, VS Code / WebStorm |
| For Rental Module (V2.0) | Minimum code version 4.0 |
Local Development Setup
Choose the right development environment for your local machine based on the operating system. Follow the instructions below for a smooth setup:
Windows (XAMPP)
Download and install XAMPP to set up a comprehensive local development environment on Windows.
Linux (LAMP)
Configure the LAMP stack on your Linux distribution for the local development environment.
MacOS (MAMP)
Install MAMP to establish a compatible local development environment on MacOS.
cPanel Configuration
Before starting the admin installation, the database must be configured for the application. Follow these database setup guidelines:
Create a database
Navigate to the MySQL Databases section and create a new database for the application.
Create a user for the database
Create a new database user and assign a secure password.
Add user to the database
Associate the user with the database and assign all privileges.
Domain Configuration
Navigate to your cPanel and locate the domain configuration. For 6amMart, it is essential to have two domains or subdomains. Use your main domain to host the customer web panel. Create a subdomain for the admin panel (e.g. if your domain is example.com, generate a subdomain like admin.example.com).
VPS Droplet & LAMP Stack Setup
To host your application on a VPS (like Digital Ocean), configure a droplet with at least 2 cores CPU and 4GB RAM. Set up the LAMP stack (Linux, Apache2, MySQL, PHP) on Ubuntu by running these commands:
Update Package Lists
Ensure package repositories are up to date.
sudo apt update
Install Apache Server
Install Apache2 web server.
sudo apt install apache2 -y
Install MySQL Server
Install MySQL package.
sudo apt install mysql-server -y
Install PHP
Install PHP and core apache bindings.
sudo apt install php libapache2-mod-php php-mysql -y
Test PHP Processing
Verify PHP is rendering by placing an info.php page.
/var/www/html/info.phpecho "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php
Install Additional PHP Extensions
Install all required PHP packages for Laravel 12.
sudo apt install php-bcmath php-ctype php-json php-mbstring php-openssl php-pdo php-tokenizer php-xml php-zip php-fileinfo php-gd php-sodium php-mysql php-curl -y
Apache Virtual Host Configuration
Configure a virtual host (vhost) file to point Apache to your project's public directory.
Create a Configuration File
Navigate to sites-available and create your configuration file.
Terminal Commandcd /etc/apache2/sites-available/
sudo nano your_domain.com.conf
Virtual Host Template
Paste the virtual host template, updating the DocumentRoot and server names to your domain.
your_domain.com.conf<VirtualHost *:80>
ServerAdmin webmaster@your_domain.com
ServerAlias www.your_domain.com
ServerName your_domain.com
DocumentRoot /var/www/your_domain.com/public_html
<Directory /var/www/your_domain.com/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Enable Site & Reload
Enable the site in Apache and restart the web server.
sudo a2ensite your_domain.com.conf
sudo systemctl reload apache2
SSL Configuration with Certbot
Set up a free, auto-renewing Let's Encrypt SSL certificate using Certbot.
Remove legacy Certbot packages
Avoid version conflicts by removing system-packaged Certbot versions.
sudo apt-get remove certbot
Install Certbot and Link Command
Install Certbot using snap and link the executable.
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Get and Install SSL Certificate
Run the Certbot Apache plugin to verify your domain and configure HTTPS.
sudo certbot --apache
Test Automatic Renewal
Verify that the renewal systemd timer works.
sudo certbot renew --dry-run
MySQL Database Console Setup
If setting up the database via SSH, run the following SQL queries in the MySQL command console:
Login & Database creation queries
Log in to MySQL and initialize the database schema and credentials.
MySQL Shell Commandssudo mysql
CREATE DATABASE your_database_name;
CREATE USER 'your_username'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_username'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Install phpMyAdmin (Optional)
Optionally install phpMyAdmin to manage tables graphically.
sudo apt update
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y
sudo systemctl restart apache2
Project Deployment & Permissions
Upload and Extract Files
Upload the ZIP file to /var/www/your_domain.com/public_html and unzip the contents.
apt install unzip -y
unzip your_file_name.zip
Configure file permissions
Apply standard file and folder permissions so Laravel can execute write operations.
chmod commandssudo chmod 755 .env
sudo chmod 777 modules_statuses.json
sudo chmod 777 app/Providers/RouteServiceProvider.php
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap/cache
sudo chmod -R 777 resources/lang