Manual Server Setup (Without cPanel)

Setting up the SaaS module on a VPS or dedicated server without cPanel. This guide covers Apache and Nginx configurations.

If your server doesn't have cPanel (for example, you're using a VPS from DigitalOcean, AWS, Linode, Vultr, etc.), you'll need to configure your web server manually. Don't worry β€” we'll walk you through every step.

circle-info

What is a VPS? A VPS (Virtual Private Server) is like having your own mini-server in the cloud. It gives you full control over your server settings, which is actually better for running a SaaS platform because you have no limitations on databases, domains, etc.

Before You Start

Make sure you have:

  • SSH access to your server (you'll need to run commands in the terminal)

  • Root or sudo access (to edit server configuration files)

  • Perfex CRM already installed and working

  • The SaaS module already installed (follow the Installation guide first)


Step 1: Identify Your Web Server

First, figure out which web server you're running. Connect to your server via SSH and run:

# Check if Apache is running:
apache2 -v
# or
httpd -v

# Check if Nginx is running:
nginx -v

Now follow the section that matches your web server.


Apache Configuration

If you're running Apache (the most common web server for PHP applications):

For Subdirectory Mode (/ws/tenant-name)

Subdirectory mode usually works out of the box with Apache if mod_rewrite is enabled. Verify it's enabled:

Make sure your Perfex CRM's .htaccess file exists in the root directory. The module adds its own rewrite rules automatically.

For Subdomain Mode (tenant-name.yoursite.com)

You need to configure Apache to handle wildcard subdomains:

  1. Edit your Apache virtual host configuration:

  1. Add or modify the ServerAlias to include a wildcard:

  1. Restart Apache:

circle-info

What does ServerAlias *.yoursite.com mean? It tells Apache: "Any request that comes to ANY subdomain of yoursite.com should be handled by this virtual host." So whether someone visits acme.yoursite.com or bigco.yoursite.com, Apache knows to send it to your Perfex CRM, and the SaaS module figures out which tenant to show.


Nginx Configuration

If you're running Nginx:

For Subdirectory Mode

Subdirectory mode usually works with the standard Nginx configuration for Perfex CRM. Make sure your location block includes the try_files directive:

For Subdomain Mode

For wildcard subdomain support in Nginx:

The key change is adding *.yoursite.com to the server_name directive.

After editing, test and restart Nginx:


Step 2: Configure MySQL (No cPanel)

Since you don't have cPanel, you need to ensure your MySQL user has the right privileges:

triangle-exclamation

Now go to your SaaS Settings and enter these MySQL credentials:

Field
Value

I have cPanel

No

MySQL Host

localhost

MySQL Port

3306

MySQL Root Username

saas_admin

MySQL Password

The password you set above

Click "Click here to verify server settings" to confirm everything works.


Step 3: Set Up DNS

Follow the DNS & Domain Configuration guide to set up your DNS records based on which URL structure you chose.


Step 4: File Permissions

Make sure the following directories are writable by the web server:


Testing Your Setup

  1. Create a test plan in SaaS Management β†’ Plans

  2. Visit your landing page URL

  3. Register a test tenant

  4. Check that the tenant's database was created (look in MySQL: SHOW DATABASES;)

  5. Access the tenant's CRM URL and verify it works

If everything works β€” congratulations! Your manual server setup is complete.


Common Issues on VPS/Dedicated Servers

Issue
Cause
Fix

Subdomains show "404 Not Found"

Apache/Nginx not configured for wildcard

Add ServerAlias *.yoursite.com (Apache) or server_name *.yoursite.com (Nginx)

"Access denied" MySQL errors

MySQL user lacks privileges

Run the GRANT ALL PRIVILEGES command above

File upload errors

Directory permissions too restrictive

Run the chown and chmod commands above

Blank white page

PHP error β€” check logs

Check /var/log/apache2/error.log or /var/log/nginx/error.log

circle-check

Last updated