# Multi-Tenant Setup Quick Reference

## Choose Your Environment

### Ubuntu + Nginx
👉 **File:** `docs/nginx-ubuntu-setup.md`

### Ubuntu + Apache
👉 **File:** `docs/apache-ubuntu-setup.md`

### Windows + WAMP
👉 **File:** `docs/wamp-server-setup.md` ← **You are here**

---

## WAMP Quick Steps (5 minutes)

1. **Install WAMP**
   - Download: https://www.wampserver.com/
   - Install to: `C:\wamp64`

2. **Hosts File** (as Admin)
   - Path: `C:\Windows\System32\drivers\etc\hosts`
   - Add:
   ```
   127.0.0.1 dev.ifrap.com
   127.0.0.1 dev.localtenant.com
   ```
   - Save

3. **WAMP Folder**
   - Extract IFRAP to: `C:\wamp64\www\IFRAP`

4. **Apache VHost**
   - WAMP tray → Apache → httpd-vhosts.conf
   - Add config (see full guide)

5. **Restart + Composer**
   ```bash
   cd C:\wamp64\www\IFRAP
   composer install
   php artisan migrate
   php artisan optimize:clear
   ```

6. **Test**
   - http://dev.ifrap.com
   - Add domain: `dev.localtenant.com` in settings
   - http://dev.localtenant.com

✓ Done!

---

## Shared .env (All Environments)

```env
APP_URL=http://dev.ifrap.com
APP_ENV=local
APP_DEBUG=true

CENTRAL_DOMAINS=dev.ifrap.com,localhost,127.0.0.1
TENANT_DOMAIN_EXPECTED_HOST=dev.ifrap.com
TENANT_DOMAIN_TARGETS=dev.ifrap.com,127.0.0.1
```

---

## Need Help?

- **Hosts not working?** → `ipconfig /flushdns`
- **Apache won't start?** → Check port 80 not in use
- **Wrong theme?** → `php artisan optimize:clear`
- **DB error?** → Check phpMyAdmin: `http://localhost/phpmyadmin`

See full guide in `docs/wamp-server-setup.md` for detailed troubleshooting.
