📖 Guide Overview: This guide covers server preparation and configuration. Complete these steps BEFORE proceeding to the Installation Guide.
Document Order:
Document Order:
- Server Setup & Configuration (You are here) - Prepare your server
- Installation Guide - Install the application
📋 Quick Navigation
1. Server Requirements
📌 Important: Make sure your server meets these minimum requirements before proceeding with installation.
Minimum Server Specifications
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 2 GB | 4 GB or more |
| vCPU | 1 Core | 2 Cores or more |
| Disk Space | 10 GB SSD | 20 GB SSD or more |
| Bandwidth | 100 Mbps | 1 Gbps |
Supported Operating Systems
- Ubuntu 20.04 LTS or later (Recommended)
- Ubuntu 22.04 LTS
- Debian 11 or later
- CentOS 8 or later
- Rocky Linux 8 or later
- AlmaLinux 8 or later
Required Software & PHP Extensions
Core Requirements
| Software | Version | Purpose |
|---|---|---|
| PHP | 8.2 or 8.3 | Application runtime |
| MySQL | 8.0+ | Database server |
| Nginx | 1.18+ | Web server (recommended) |
| Apache | 2.4+ | Alternative web server |
| Composer | 2.x | PHP dependency manager |
| Node.js | 18.x or 20.x | For building frontend (optional) |
📥 How to Install Required Software
💡 For Beginners: If you're using a control panel like cPanel, Hestia, or aaPanel, most of this software is already installed. You only need these commands if you're setting up a fresh VPS/server manually.
Install PHP 8.2 (Ubuntu/Debian)
# Add PHP repository
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
# Install PHP 8.2 and all required extensions
sudo apt install -y php8.2 php8.2-fpm php8.2-cli php8.2-common \
php8.2-curl php8.2-gd php8.2-mbstring php8.2-mysql \
php8.2-xml php8.2-zip php8.2-bcmath php8.2-intl \
php8.2-fileinfo php8.2-tokenizer php8.2-redis
# Verify installation
php -v
🔗 Official PHP Website: https://www.php.net/downloads
Install MySQL 8.0 (Ubuntu/Debian)
# Install MySQL Server
sudo apt update
sudo apt install -y mysql-server
# Secure MySQL installation (set root password, remove test databases)
sudo mysql_secure_installation
# Start MySQL and enable on boot
sudo systemctl start mysql
sudo systemctl enable mysql
# Verify installation
mysql --version
🔗 Official MySQL Website: https://dev.mysql.com/downloads/
Install Nginx (Ubuntu/Debian)
# Install Nginx
sudo apt update
sudo apt install -y nginx
# Start Nginx and enable on boot
sudo systemctl start nginx
sudo systemctl enable nginx
# Verify installation
nginx -v
# Check if Nginx is running
sudo systemctl status nginx
🔗 Official Nginx Website: https://nginx.org/en/download.html
Install Apache (Alternative to Nginx)
# Install Apache
sudo apt update
sudo apt install -y apache2
# Enable required modules
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod ssl
# Start Apache and enable on boot
sudo systemctl start apache2
sudo systemctl enable apache2
# Verify installation
apache2 -v
🔗 Official Apache Website: https://httpd.apache.org/download.cgi
Install Composer (PHP Package Manager)
# Download and install Composer
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
# Install Composer globally
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# Remove installer
rm composer-setup.php
# Verify installation
composer --version
🔗 Official Composer Website: https://getcomposer.org/download/
Install Node.js 20.x (Optional - Only if Building Frontend)
# Install Node.js 20.x using NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
# Verify installation
node -v
npm -v
🔗 Official Node.js Website: https://nodejs.org/en/download/
🖥️ Windows Users (For Local Testing Only)
⚠️ Note: For production, use a Linux server. Windows instructions are for local development/testing only.
Option 1: Use XAMPP (Easiest for Windows)
- Download XAMPP from: https://www.apachefriends.org/download.html
- Choose the version with PHP 8.2
- Run the installer and follow the wizard
- Start Apache and MySQL from XAMPP Control Panel
Option 2: Use Laragon (Recommended for Laravel)
- Download Laragon from: https://laragon.org/download/
- Install and run Laragon
- It includes PHP, MySQL, Nginx/Apache, and Composer
- Click "Start All" to run the server
📦 All-in-One Installation Script (Ubuntu/Debian)
🚀 Quick Setup: Run this single script to install everything at once on a fresh Ubuntu server:
#!/bin/bash
# Ashie Resume | JobPortal - Complete Server Setup Script
# Update system
sudo apt update && sudo apt upgrade -y
# Add PHP repository
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
# Install PHP 8.2 and all extensions
sudo apt install -y php8.2 php8.2-fpm php8.2-cli php8.2-common \
php8.2-curl php8.2-gd php8.2-mbstring php8.2-mysql \
php8.2-xml php8.2-zip php8.2-bcmath php8.2-intl \
php8.2-fileinfo php8.2-tokenizer php8.2-redis
# Install MySQL
sudo apt install -y mysql-server
# Install Nginx
sudo apt install -y nginx
# Install Composer
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
# Install Node.js (optional)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
# Install additional utilities
sudo apt install -y git unzip curl
# Start services
sudo systemctl start nginx
sudo systemctl start mysql
sudo systemctl start php8.2-fpm
# Enable services on boot
sudo systemctl enable nginx
sudo systemctl enable mysql
sudo systemctl enable php8.2-fpm
echo "✅ Installation complete!"
echo "PHP version: $(php -v | head -n 1)"
echo "MySQL version: $(mysql --version)"
echo "Nginx version: $(nginx -v 2>&1)"
echo "Composer version: $(composer --version)"
echo "Node.js version: $(node -v)"
To use this script:
- Save the above code as
setup.sh - Make it executable:
chmod +x setup.sh - Run it:
sudo ./setup.sh
Required PHP Extensions
All these PHP extensions must be enabled:
| Extension | Purpose |
|---|---|
| php-cli | Command line interface |
| php-common | Common PHP libraries |
| php-curl | HTTP requests & API calls |
| php-gd | Image processing |
| php-json | JSON handling |
| php-mbstring | Multi-byte string support |
| php-mysql | MySQL database driver |
| php-xml | XML parsing |
| php-zip | ZIP file handling |
| php-bcmath | Arbitrary precision math |
| php-intl | Internationalization |
| php-fileinfo | File information |
| php-tokenizer | PHP tokenizer |
PHP Configuration Requirements
memory_limit = 256M
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 300
max_input_time = 300
2. Pre-Installation Preparation
⚠️ Before You Begin: Make sure you have received the following files from your purchase:
- ashie-resume-backend.zip - The complete application package
- database.sql - Sample database file
- Purchase Code - Your license key
📦 About the Application Package:
The
The
ashie-resume-backend.zip contains the Laravel backend with the React frontend already built and included in the public/ folder. This means:
- ✅ You get everything in one package
- ✅ Frontend is pre-compiled and optimized
- ✅ No need to build or compile anything
- ✅ Just upload, configure, and run!
What You'll Need
- Domain name (e.g., yourdomain.com)
- Domain pointed to your server (A record configured)
- Server root access or control panel access
- FTP/SFTP client (FileZilla, WinSCP) or File Manager
- Text editor (Notepad++, VS Code, or panel's file editor)
- Your purchase code from the marketplace
Domain Setup Options
🔔 Important Decision: Choose ONE of these setup options based on your preference.
Option A: Single Domain Setup (Recommended for Beginners)
✅ Easiest Setup: Everything runs on one domain (e.g., yourdomain.com)
- Frontend: yourdomain.com
- Backend API: yourdomain.com/api/v1/*
- Admin Panel: yourdomain.com/admin
- ✅ Simpler DNS configuration
- ✅ One SSL certificate
- ✅ No CORS issues
- ✅ Already pre-configured
Option B: Subdomain Setup (Advanced Users)
⚙️ Advanced Setup: Separate backend and frontend domains
- Frontend: yourdomain.com
- Backend API: backend.yourdomain.com
- Admin Panel: backend.yourdomain.com/admin
- ⚠️ Additional DNS configuration
- ⚠️ Separate SSL certificates (or wildcard cert)
- ⚠️ CORS configuration in backend .env
- ⚠️ Frontend API URL configuration
DNS Configuration
For Option A (Single Domain):
1
Add A Record for Main Domain
Type: A
Name: @ (or yourdomain.com)
Value: Your Server IP (e.g., 192.168.1.100)
TTL: 3600
2
Add WWW Record (Optional)
Type: CNAME
Name: www
Value: yourdomain.com
TTL: 3600
For Option B (Subdomain Setup):
1
Add A Record for Main Domain
Type: A
Name: @ (or yourdomain.com)
Value: Your Server IP (e.g., 192.168.1.100)
TTL: 3600
2
Add A Record for Backend Subdomain
Type: A
Name: backend
Value: Your Server IP (same as above)
TTL: 3600
3
Add WWW Record (Optional)
Type: CNAME
Name: www
Value: yourdomain.com
TTL: 3600
📝 For Subdomain Setup: You'll need to create TWO websites in your control panel:
- Website 1: backend.yourdomain.com → Upload backend files here
- Website 2: yourdomain.com → Point to frontend (backend/public folder)
⏱️ DNS Propagation: DNS changes can take 1-24 hours to propagate worldwide. You can check propagation status at whatsmydns.net
3. Control Panel Setup
📌 Choose Your Control Panel: Click on your control panel below to see specific instructions.
Hestia Control Panel Setup
Step 1: Log in to Hestia
Open your browser and go to:
https://your-server-ip:8083
Step 2: Create a New Web Domain
1
Click "WEB" in the top menu
2
Click "Add Web Domain" button
3
Enter your domain name (e.g., yourdomain.com)
4
Check "Enable SSL" for HTTPS
5
Click "Save"
Step 3: Configure PHP Version
1
Click on your domain in the list
2
Find "PHP Version" dropdown
3
Select PHP 8.2 or PHP 8.3
4
Click "Save"
Step 4: Configure Nginx for Laravel
Edit your domain's Nginx configuration and add inside the server block:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Step 5: Upload Files
1
Click "FILE MANAGER" in the menu
2
Navigate to
/home/admin/web/yourdomain.com/public_html
3
Delete any existing files (index.html, etc.)
4
Upload
ashie-resume-backend.zip
5
Right-click → Extract
6
Move all files from extracted folder to public_html root
aaPanel Setup
Step 1: Log in to aaPanel
Open your browser and go to:
http://your-server-ip:8888
Step 2: Create a New Website
1
Click "Website" in the left sidebar
2
Click "Add site" button
3
Enter your domain name
4
Database: Select "Create"
5
PHP Version: Select PHP 8.2
6
Click "Submit"
📝 Save the database credentials! You'll need them for configuration.
Step 3: Configure Site Settings
1
Click on your site name to open settings
2
Go to "Site directory" tab
3
Set Running directory to:
/public
4
Click "Save"
Step 4: Configure URL Rewrite (Important!)
1
Go to "URL rewrite" tab
2
Select "laravel5" from the dropdown
3
Click "Save"
Step 5: Configure SSL (Recommended)
1
Go to "SSL" tab
2
Click "Let's Encrypt"
3
Select your domain(s)
4
Click "Apply"
5
Enable "Force HTTPS"
Step 6: Upload Files
1
Click "Files" in the left sidebar
2
Navigate to
/www/wwwroot/yourdomain.com
3
Delete existing files
4
Click "Upload" and upload
ashie-resume-backend.zip
5
Right-click → "Unzip"
6
Move all files from extracted folder to the website root
cPanel Setup
Step 1: Log in to cPanel
Open your browser and go to:
https://yourdomain.com:2083 or https://yourdomain.com/cpanel
Step 2: Create Database
1
Find MySQL Databases icon under "Databases" section
2
Under "Create New Database", enter database name (e.g.,
ashie_db)
3
Click "Create Database"
4
Scroll to "Add New User" and create a new user with a strong password
5
Under "Add User To Database", select your new user and database
6
Check "ALL PRIVILEGES" and click "Make Changes"
📝 Important: Note down your database name with prefix (e.g.,
cpanelusername_ashie_db), username with prefix, and password!
Step 3: Import Database
1
Click "phpMyAdmin" in cPanel
2
Click on your new database in the left sidebar
3
Click "Import" tab
4
Click "Choose File" and select
database.sql
5
Click "Go" at the bottom
Step 4: Upload Application Files
1
Click "File Manager" in cPanel
2
Navigate to
public_html
3
Delete all existing files (if any)
4
Click "Upload" and upload
ashie-resume-backend.zip
5
Right-click the zip file → "Extract"
6
Move all files from extracted folder to public_html root
Step 5: Configure Document Root (Important!)
1
Go back to cPanel home
2
Find "Domains" or "MultiPHP Manager"
3
Click on your domain
4
Change Document Root to:
public_html/public
5
Click "Save"
Step 6: Setup Cron Jobs (Background Tasks)
1
In cPanel, find "Cron Jobs"
2
Click Cron Jobs icon
3
Under "Add New Cron Job"
4
Common Settings: Select "Once Per Minute (* * * * *)"
5
Command:
/usr/local/bin/php /home/username/public_html/artisan schedule:run >> /dev/null 2>&1
⚠️ Replace
username with your actual cPanel username!
6
Click Add New Cron Job
Step 7: Select PHP Version
1
Click "Select PHP Version" or "MultiPHP Manager"
2
Select your domain
3
Change PHP version to 8.2 or 8.3
4
Click "Apply"
5
Click "Extensions" tab and ensure these are enabled:
- curl
- gd
- mbstring
- mysqli
- pdo_mysql
- xml
- zip
- bcmath
- intl
- fileinfo
4. File & Folder Permissions
📌 Why Permissions Matter: Correct permissions ensure your application can write logs, upload files, and cache data while maintaining security.
Understanding Permission Numbers
| Permission | Number | Meaning | When to Use |
|---|---|---|---|
| 755 | rwxr-xr-x | Owner can read/write/execute, others can read/execute | Most files and folders |
| 775 | rwxrwxr-x | Owner & group can read/write/execute | Storage, cache folders |
| 777 | rwxrwxrwx | Everyone can read/write/execute | ⚠️ Only if 775 doesn't work |
| 644 | rw-r--r-- | Owner can read/write, others can only read | Regular files (.php, .env) |
Required Permissions for Ashie Resume | JobPortal
| Directory/File | Permission | Recursive? | Purpose |
|---|---|---|---|
storage/ |
775 | ✅ Yes | Logs, sessions, file uploads, cache |
storage/app/ |
775 | ✅ Yes | Uploaded resumes, documents |
storage/framework/ |
775 | ✅ Yes | Framework cache, sessions, views |
storage/logs/ |
775 | ✅ Yes | Application logs |
bootstrap/cache/ |
775 | ✅ Yes | Configuration cache |
public/storage/ |
755 | ✅ Yes | Public accessible uploads |
.env |
644 | ❌ No | Environment configuration |
| All other files | 644 | ❌ No | PHP files, assets |
| All other folders | 755 | ✅ Yes | Application directories |
Setting Permissions via SSH
# Navigate to application directory
cd /var/www/yourdomain.com
# Set base permissions
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
# Set writable directories
chmod -R 775 storage
chmod -R 775 bootstrap/cache
# Set ownership (adjust username)
chown -R www-data:www-data .
# OR for some servers:
chown -R apache:apache .
# OR for cPanel:
chown -R username:username .
Setting Permissions via File Manager
1
Open your control panel's File Manager
2
Navigate to your application root
3
Select
storage folder
4
Right-click → Permissions or Change Permissions
5
Enter 775 in the number field
6
Check "Recurse into subdirectories" or "Apply to subdirectories"
7
Click Change or Apply
8
Repeat steps 3-7 for
bootstrap/cache folder
⚠️ Security Note: Never set
.env file to 777! This file contains sensitive credentials. Keep it at 644.
🚫 Common Mistake: If you get "Permission Denied" errors, DO NOT set everything to 777! This is a security risk. Instead:
- Check file ownership (should match web server user)
- Ensure 775 on storage and bootstrap/cache
- Clear cache:
php artisan cache:clear - Contact your hosting support if issues persist
5. Database Setup
Creating the Database
1
Choose a Database Name
Use a descriptive name like:
Use a descriptive name like:
ashie_resume_db or job_portal_db
⚠️ cPanel Users: Your database name will have a prefix like:
cpanelusername_ashie_resume_db
2
Create Database User
Username example:
Generate a strong password and save it securely!
Username example:
ashie_userGenerate a strong password and save it securely!
3
Grant Privileges
The database user must have ALL PRIVILEGES on the database
The database user must have ALL PRIVILEGES on the database
Importing Sample Database
The
database.sql file contains all necessary tables, sample data, and default settings.
Method 1: Using phpMyAdmin (Recommended)
1
Access phpMyAdmin from your control panel
2
Click on your database name in the left sidebar
3
Click the Import tab at the top
4
Click Choose File button
5
Select
database.sql from your computer
6
Leave all other settings as default
7
Scroll to bottom and click Go button
8
Wait for "Import has been successfully finished" message
Method 2: Using SSH/Terminal
# Upload database.sql to server first, then:
mysql -u your_username -p your_database_name < database.sql
# You'll be prompted for password
# Type your database password and press Enter
Verifying Database Import
1
In phpMyAdmin, click on your database
2
You should see multiple tables like:
- users
- jobs
- resumes
- companies
- applications
- system_states
- And many more...
✅ Success! If you see tables listed, your database is imported correctly.
❌ Import Failed? Common issues:
- File too large: Increase
upload_max_filesizeandpost_max_sizein PHP settings - Timeout: Use SSH method for large databases
- Permission denied: Ensure database user has ALL PRIVILEGES
- Already exists: Drop existing tables or use a fresh database