ConnectWise Sync API – deployment checklist
============================================

IMPORTANT: In your cPanel, "Primary Domain" is frndcntr.5dfapps.com. So public_html
is served at https://frndcntr.5dfapps.com, NOT at https://galileo.core-dns.net.
Use https://frndcntr.5dfapps.com/api/auth.php for the API (the extension is set to this).

If you had 404 on galileo.core-dns.net/api/auth.php:
Then the domain's DOCUMENT ROOT was wrong, or you were using the wrong domain (see above).

FIX: Point the domain to public_html
------------------------------------
1. In cPanel go to: Domains → Domains (or "Addon Domains" if galileo is addon).
2. Find galileo.core-dns.net and check "Document Root" (or "Root Domain").
3. It must be: public_html   (or the full path ending in public_html, e.g. public_html)
4. If it shows something like public_html/galileo or public_html/core-dns.net, change it to public_html so the site is served from public_html. Then https://galileo.core-dns.net/api/auth.php will find public_html/api/auth.php.

Alternative: If you cannot change document root, copy the api folder AND config.php, db.php into the folder that IS the document root (e.g. public_html/galileo.core-dns.net) so that folder contains api/auth.php, etc.

Quick tests (in Postman or browser)
-----------------------------------
1. Upload status.php into public_html/api/ (from server/api/status.php). Then open:
   https://galileo.core-dns.net/api/status.php
   - If you see {"ok":true,"message":"API folder is reachable"} → API folder is correct; then auth.php may have a PHP error (check server error log).
   - If status.php also returns 404 → document root is NOT public_html (see below).

2. Create public_html/test.txt with content "ok". Open https://galileo.core-dns.net/test.txt
   - If you see "ok" → document root is public_html; then something is blocking /api/ (e.g. .htaccess in public_html, or Apache config).
   - If 404 → document root for galileo.core-dns.net is NOT public_html.

REQUIRED file layout (document root folder, often public_html):
  document_root/
  ├── config.php
  ├── db.php
  └── api/
      ├── .htaccess
      ├── auth.php
      ├── save.php
      └── load.php
