COPyleaks PHP + MySQL
1. Import private/schema.sql into a MySQL database via phpMyAdmin.
2. Copy public/*.php into /home/dominuscom/copyleaks.dominus.com.bo/
3. Copy private/ into /home/dominuscom/copyleaks_private/ (OUTSIDE document root).
4. In each public PHP file, change require __DIR__.'/../private/bootstrap.php' to require '/home/dominuscom/copyleaks_private/bootstrap.php';
5. Edit copyleaks_private/config.php: DB credentials, admin_key, copyleaks_token and storage => '/home/dominuscom/copyleaks_private/storage'.
6. Create /home/dominuscom/copyleaks_private/storage/exports with permissions 700.
7. Enable HTTPS, PHP 8.1+, PDO MySQL, cURL, fileinfo; allow outgoing HTTPS.
8. In cPanel MultiPHP INI Editor set upload_max_filesize and post_max_size suitably (example 25M and 30M).
9. POST multipart/form-data to /submit.php with file=@document.pdf and sandbox=true, header X-API-Key: <admin_key>.
10. POST /export.php with scan_id=..., header X-API-Key; only after webhook completed.
11. GET /query.php?scan_id=..., /artifacts.php?export_id=..., /download.php?artifact_id=..., all require X-API-Key.
SECURITY: Never put config/storage in public_html. Rotate token when expired. Store admin key securely. Do not expose webhook secret in logs or screenshots. Keep HTTPS mandatory. Use least-privilege DB account. Set maximum upload size. Verify webhook signatures/certificates for high-assurance production deployments. Export receiver uses secret URL and does not implement mutual TLS.
NOTE: Webhooks only work for scans submitted via API with webhook URLs. Existing web-UI scans are not retroactively imported.
