Plesk
✅ Requirements
Before configuring, ensure:
Your Concord CRM instance is successfully hosted on Plesk.
You have root or admin access to Plesk.
Your server supports Let's Encrypt extension (pre-installed in most Plesk environments).
Your domain’s DNS is managed via Plesk or you can modify DNS records.
SaaS module is installed and activated in Concord CRM.
🧭 Goal
Enable multi-tenant SaaS routing with:
Automatic database provision for new tenants
Wildcard Subdomain Support (e.g.
tenant1.yoursaas.com)Custom Domain Support (e.g.
clientdomain.com)Automatic SSL (via Let’s Encrypt) for both
⚙️ Step-by-Step Configuration
1. Set Public Document Root
Ensure your web root for Concord CRM (usually /httpdocs/public) is correctly set in Plesk:
Go to Websites & Domains > Hosting Settings
Set Document Root to:
httpdocs/public
This ensures all tenants and domains serve from the same entry point.
2. Configure Wildcard Subdomain Support
🛠 A. Set Wildcard DNS Record
Go to Websites & Domains > DNS Settings
Add a record:
Type: A Domain: *.yoursaas.com Points to: Your Plesk server's IP
📌 This allows all subdomains like
tenant1.yoursaas.com,tenant2.yoursaas.com, etc. to resolve to your server.
🔐 B. Enable Wildcard SSL (Let's Encrypt)
Go to Websites & Domains > SSL/TLS Certificates
Click Install Let's Encrypt
Select:
yoursaas.com*.yoursaas.com✅ (Wildcard)
Click Install
Note: Wildcard SSL requires DNS-based validation. Plesk handles this automatically if DNS is managed within Plesk.
3. Add Catch-All Apache/Nginx Configuration (Optional but Recommended)
Plesk internally manages Nginx/Apache, but if you're using custom server configuration via root SSH access:
For Apache:
<VirtualHost *:80>
ServerName _
DocumentRoot /var/www/vhosts/yoursaas.com/httpdocs/public
CustomLog "|/usr/bin/tee -a /var/log/apache2/vhost_%v.access.log" vhost_combined
ErrorLog /var/log/apache2/vhost_%v.error.log
</VirtualHost>For Nginx (If used):
server {
listen 80 default_server;
server_name _;
root /var/www/vhosts/yoursaas.com/httpdocs/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}4. Configure Custom Domain Support for Tenants
When a client wants to use a custom domain (e.g., clientdomain.com):
🪪 Ask the Client to Point DNS
The client should set their A record like so:
Type: A
Host: @ (or root)
Value: <Your Server IP> Optionally:
makefileCopyEditType: CNAME
Host: www
Value: clientdomain.com 🔄 SSL Renewal & Maintenance
Let’s Encrypt in Plesk auto-renews SSL certificates every 60–90 days.
Ensure:
Port 80 and 443 are open
DNS continues to resolve correctly
You can verify SSL status via:
Plesk Dashboard
SSL Labs
📌 Troubleshooting
Subdomain doesn’t resolve
Check wildcard DNS record (*.yoursaas.com)
Custom domain shows default
Ensure it is added as a separate domain with correct document root
SSL error on custom domain
Ensure Let’s Encrypt is installed and domain points to the server IP
Last updated