# Domain Analysis: catalyst.syntheon.in

## Current Status

**Domain**: `http://catalyst.syntheon.in/`  
**DNS Resolution**: `14.194.218.43` (points to this server)  
**Current Behavior**: Shows **Apache2 Ubuntu Default Page** (not configured)

## Problem

The domain `catalyst.syntheon.in` is **NOT configured** in Apache, so it falls back to the default virtual host which serves `/var/www/html/index.html` (the default Apache welcome page).

## Existing Catalyst Domain Configurations

### 1. **devcatalyst.syntheon.in** ✅ (Configured)
- **Status**: Active (enabled in sites-enabled)
- **Configuration**: `/etc/apache2/sites-available/devcatalyst.syntheon.in.conf`
- **Routing**:
  - HTTP (Port 80): Proxies `/postcall-api` to `http://127.0.0.1:5000/`
  - HTTPS (Port 443): Same proxy configuration with SSL
- **SSL Certificate**: `/etc/letsencrypt/live/devcatalyst.syntheon.in/`
- **Purpose**: Development environment for postcall API

### 2. **qacatalyst.syntheon.in** ✅ (Configured)
- **Status**: Active (enabled in sites-enabled)
- **Configuration**: `/etc/apache2/sites-available/qacatalyst.syntheon.in.conf`
- **Routing**:
  - HTTPS (Port 443): Serves `/var/www/html/postcall-web/`
  - React Router support (rewrites to index.html)
- **SSL Certificate**: `/etc/letsencrypt/live/qacatalyst.syntheon.in/`
- **Purpose**: QA environment for postcall web application

### 3. **catalyst.syntheon.in** ❌ (NOT Configured)
- **Status**: **Missing configuration**
- **Current Behavior**: Falls back to default virtual host
- **Serves**: `/var/www/html/index.html` (Apache default page)
- **Action Required**: Create virtual host configuration

## Default Virtual Host Configuration

The default virtual host (`000-default.conf`) is configured as:
- **DocumentRoot**: `/var/www/html`
- **Port 80**: Serves `/var/www/html/index.html`
- **Port 443**: Configured for `devapp.syntheon.in` (not catalyst)

## What Needs to Be Done

To properly configure `catalyst.syntheon.in`, you need to:

1. **Create Virtual Host Configuration**
   - Create `/etc/apache2/sites-available/catalyst.syntheon.in.conf`
   - Define routing (similar to devcatalyst or qacatalyst)

2. **Decide on Routing**:
   - **Option A**: Proxy to an application (like devcatalyst)
   - **Option B**: Serve static files from a directory (like qacatalyst)
   - **Option C**: Route to a specific application/service

3. **Enable SSL Certificate** (if HTTPS needed):
   ```bash
   sudo certbot --apache -d catalyst.syntheon.in
   ```

4. **Enable the Site**:
   ```bash
   sudo a2ensite catalyst.syntheon.in.conf
   sudo systemctl reload apache2
   ```

## Recommended Configuration

Based on the pattern of other catalyst domains, here's a suggested configuration:

### If it should proxy to an API (like devcatalyst):
```apache
<VirtualHost *:80>
    ServerName catalyst.syntheon.in
    ServerAlias www.catalyst.syntheon.in
    
    ProxyPreserveHost On
    ProxyPass /api http://127.0.0.1:PORT/
    ProxyPassReverse /api http://127.0.0.1:PORT/
    
    ErrorLog ${APACHE_LOG_DIR}/catalyst-error.log
    CustomLog ${APACHE_LOG_DIR}/catalyst-access.log combined
</VirtualHost>
```

### If it should serve a web application (like qacatalyst):
```apache
<VirtualHost *:80>
    ServerName catalyst.syntheon.in
    ServerAlias www.catalyst.syntheon.in
    DocumentRoot /var/www/html/PATH_TO_APP
    
    <Directory /var/www/html/PATH_TO_APP>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/catalyst-error.log
    CustomLog ${APACHE_LOG_DIR}/catalyst-access.log combined
</VirtualHost>
```

## Related Domains on This Server

- `devapp.syntheon.in` → `/var/www/html/voicebot-web/`
- `app.syntheon.in` → Redirects to HTTPS
- `dashboard.syntheon.in` → Dashboard application
- `devcatalyst.syntheon.in` → Proxies to Gunicorn (port 5000)
- `qacatalyst.syntheon.in` → `/var/www/html/postcall-web/`
- `catalyst.syntheon.in` → **NOT CONFIGURED** (shows default page)

## Next Steps

1. **Determine Purpose**: What should `catalyst.syntheon.in` serve?
   - Production API?
   - Production web app?
   - Another service?

2. **Create Configuration**: Based on the purpose, create the virtual host config

3. **Set Up SSL**: If HTTPS is needed, obtain Let's Encrypt certificate

4. **Test**: Verify the domain works correctly

## Files Location

- **Apache Configs**: `/etc/apache2/sites-available/`
- **Enabled Sites**: `/etc/apache2/sites-enabled/`
- **Default Document Root**: `/var/www/html/`
- **Logs**: `/var/log/apache2/`

## Commands to Check Status

```bash
# Check if site is enabled
ls -la /etc/apache2/sites-enabled/ | grep catalyst

# Check Apache configuration syntax
sudo apache2ctl configtest

# Check active virtual hosts (if no permission errors)
sudo apache2ctl -S

# Check DNS resolution
host catalyst.syntheon.in
```

