# Caddy Config for nexusautoparts.com.mx

## VM with Caddy: 192.168.10.74
## VM with POS/Dashboard: 192.168.10.91

Add this to `/etc/caddy/Caddyfile` on the Caddy VM (192.168.10.74):

```caddyfile
# Landing page / Dashboard
nexusautoparts.com.mx, www.nexusautoparts.com.mx {
    reverse_proxy 192.168.10.91:80
}

# POS (point of sale app)
pos.nexusautoparts.com.mx {
    reverse_proxy 192.168.10.91:80
}

# Dashboard admin (optional alternative access)
admin.nexusautoparts.com.mx {
    reverse_proxy 192.168.10.91:80
}

# Legacy domain (optional, redirect or keep)
nexus.consultoria-as.com {
    reverse_proxy 192.168.10.91:80
}
```

Then reload Caddy:
```bash
sudo systemctl reload caddy
# or
sudo caddy reload --config /etc/caddy/Caddyfile
```

Caddy will automatically obtain Let's Encrypt certificates for all domains.

## DNS Records needed in Hostinger

| Record | Name | Target |
|---|---|---|
| A | @ | IP of Caddy VM |
| CNAME | www | nexusautoparts.com.mx |
| CNAME | pos | nexusautoparts.com.mx |
| CNAME | admin | nexusautoparts.com.mx |
