Skip to content

AApanel Installation Guide πŸš€ ​

Important

AApanel uses a different file-ownership model compared to cPanel or CloudPanel.io. This sometimes causes file permission errors after uploading or extracting the script.

This is not a script issue β€” it's AApanel's default behavior. Following this guide will fix it permanently.

This guide ensures a clean and smooth installation on AApanel.

Why AApanel Needs Special Attention ​

AApanel often extracts or uploads files under the root user, while PHP-FPM runs under www or www-data. This user mismatch causes common errors like:

  • ❌ Permission denied
  • ❌ Storage not writable
  • ❌ Unable to create symlink
  • ❌ Logs not being generated
  • ❌ Queue failing

Step 1: Create the Website in AApanel ​

  1. Open AApanel β†’ Website β†’ Add Site
  2. Set your domain name (e.g., yourdomain.com)
  3. Choose the following settings:
    • PHP version: 8.1+ (recommended: 8.2 or 8.3)
    • Database: MySQL
    • Create FTP: Optional
  4. Click Submit to create the site

After creation, note your installation path:

bash
/www/wwwroot/YOURDOMAIN

Step 2: Upload the Script ​

You can upload the WhatsMarkSaaS script in two ways:

Option A: Using File Manager ​

  1. Open AApanel β†’ Files
  2. Navigate to /www/wwwroot/YOURDOMAIN
  3. Upload the .zip file
  4. Right-click and select Extract

Option B: Using SSH ​

bash
cd /www/wwwroot/YOURDOMAIN
unzip whatsmarksaas.zip

TIP

Make sure to extract/upload files inside the domain directory, not in a subdirectory.


Step 3: Fix File Ownership ⚠️ (Most Important Step) ​

AApanel often extracts files under the root user, but PHP-FPM runs under www or www-data. This mismatch causes all permission errors.

For CentOS / AApanel Default (user: www) ​

bash
chown -R www:www /www/wwwroot/YOURDOMAIN

For Ubuntu/Debian (user: www-data) ​

bash
chown -R www-data:www-data /www/wwwroot/YOURDOMAIN

Important

Replace YOURDOMAIN with your actual domain path (e.g., demo.example.com)


Step 4: Set Proper Folder Permissions ​

Laravel needs write access to specific directories:

  • /storage
  • /bootstrap/cache
  • /public/uploads (if using file uploads)

Run the following commands:

bash
chmod -R 775 /www/wwwroot/YOURDOMAIN/storage
chmod -R 775 /www/wwwroot/YOURDOMAIN/bootstrap/cache

If your script handles file uploads:

bash
chmod -R 775 /www/wwwroot/YOURDOMAIN/public/uploads

Set Permissions via AApanel GUI (Alternative Method) ​

You can also set permissions through AApanel's File Manager:

  1. Navigate to your domain folder
  2. Right-click on storage or bootstrap/cache folders
  3. Select Permission and set to 775

Set File Permissions


Step 5: Configure PHP Settings ​

  1. Open AApanel β†’ App Store β†’ PHP Settings β†’ Select your PHP version
  2. Click Install Extensions and enable the following:

Required Extensions:

  • βœ… fileinfo
  • βœ… pdo_mysql
  • βœ… openssl
  • βœ… mbstring
  • βœ… zip
  • βœ… curl
  • βœ… exif
  • βœ… bcmath
  • βœ… sockets

Recommended Extensions:

  • πŸ”Ή opcache (for better performance)
  • πŸ”Ή redis (for caching and queues)
  1. Go to Disabled Functions tab

  2. Remove these functions if listed (Laravel needs them):

    • proc_open
    • putenv
    • pcntl_* (all pcntl functions)
  3. Click Save and restart PHP-FPM


Step 6: Set Correct Document Root ​

Ensure your website points to the public directory:

/www/wwwroot/YOURDOMAIN/public

How to Set Document Root: ​

  1. AApanel β†’ Website β†’ Select your site
  2. Click Site Directory
  3. Set Running Directory to /public
  4. Click Save

Step 7: Using Web Installer ​

If your script includes a web-based installer, visit:

https://yourdomain.com/install

Follow the on-screen prompts to complete the installation.

Step 8: Setup Cron Jobs ​

WhatsMarkSaaS requires cron jobs for scheduled tasks.

Add Cron Job in AApanel: ​

  1. AApanel β†’ Cron
  2. Click Add Cron
  3. Configure as follows:

Type: Shell Script

Name: WhatsMarkSaaS Scheduler

Execution Cycle: Every minute (*/1 * * * *)

Script Content:

bash
cd /www/wwwroot/YOURDOMAIN && php artisan schedule:run >> /dev/null 2>&1
  1. Click Save

Setup Laravel Horizon (if using queues) ​

Refer to the Supervisor Setup Guide for detailed configuration.


Step 9: Restart PHP & Nginx ​

Always restart services after installation:

  1. AApanel β†’ App Store β†’ Installed
  2. Click Restart next to:
    • PHP (your version)
    • Nginx or Apache

Alternatively, use SSH:

bash
# Restart PHP-FPM
systemctl restart php-fpm-82  # Replace 82 with your PHP version

# Restart Nginx
systemctl restart nginx

# Or Apache
systemctl restart httpd

🧩 Final Notes ​

  • βœ… AApanel is powerful but requires manual permission correction because its extraction system sets ownership to root.
  • βœ… Once ownership & permissions are fixed using the steps above, WhatsMarkSaaS runs smoothly.
  • βœ… Always use the www user (or www-data on Ubuntu) when running Artisan commands.
  • βœ… Regularly check logs at storage/logs/laravel.log for any issues.

Additional Resources ​


Need Help?

If you still face issues after following this guide, please:

  1. Check the FAQ section
  2. Review storage/logs/laravel.log for error details
  3. Contact our support team

Β© 2024 - Corbital Technologies. All rights reserved.