# Quick Fix for devapp.syntheon.in

## Problem
- Apache service is **FAILED** (not running)
- `devapp.syntheon.in` not routing to `/var/www/html/voicebot-web/`
- Port 80 missing ServerName for devapp.syntheon.in

## Solution

### Step 1: Fix the 000-default.conf file

The current file has issues. You need to add a separate VirtualHost for devapp.syntheon.in on port 80.

**Add this BEFORE the closing `</VirtualHost>` tag on line 63:**

```apache
# devapp.syntheon.in HTTP configuration (Port 80)
<VirtualHost *:80>
    ServerName devapp.syntheon.in
    ServerAlias devapp.syntheon.in
    DocumentRoot /var/www/html/voicebot-web/
    
    <Directory /var/www/html/voicebot-web/>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    Alias /voicebot-api /var/www/html/voicebot-api
    
    <Directory /var/www/html/voicebot-api>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/usr/local/php83/var/run/php-fpm.sock|fcgi://localhost/"
    </FilesMatch>
    
    ErrorLog ${APACHE_LOG_DIR}/devapp.syntheon.in-error.log
    CustomLog ${APACHE_LOG_DIR}/devapp.syntheon.in-access.log common
</VirtualHost>
```

### Step 2: Commands to Fix

```bash
# 1. Backup current config
sudo cp /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/000-default.conf.backup.$(date +%Y%m%d_%H%M%S)

# 2. Edit the file (add the VirtualHost block above)
sudo nano /etc/apache2/sites-enabled/000-default.conf

# 3. Test configuration
sudo apache2ctl configtest

# 4. If syntax OK, start Apache
sudo systemctl start apache2

# 5. Check status
sudo systemctl status apache2

# 6. Test
curl -I http://devapp.syntheon.in/
curl -I https://devapp.syntheon.in/
```

## Current Status

✅ **Port 443 (HTTPS)**: Correctly configured
- ServerName: devapp.syntheon.in
- DocumentRoot: /var/www/html/voicebot-web/

❌ **Port 80 (HTTP)**: Missing ServerName
- Needs separate VirtualHost block

## Alternative: Create Separate Config File

Instead of editing 000-default.conf, you can create a separate file:

```bash
# Create new config file
sudo nano /etc/apache2/sites-available/devapp-http.conf
```

**Content:**
```apache
<VirtualHost *:80>
    ServerName devapp.syntheon.in
    ServerAlias devapp.syntheon.in
    DocumentRoot /var/www/html/voicebot-web/
    
    <Directory /var/www/html/voicebot-web/>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    Alias /voicebot-api /var/www/html/voicebot-api
    
    <Directory /var/www/html/voicebot-api>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/usr/local/php83/var/run/php-fpm.sock|fcgi://localhost/"
    </FilesMatch>
    
    ErrorLog ${APACHE_LOG_DIR}/devapp.syntheon.in-error.log
    CustomLog ${APACHE_LOG_DIR}/devapp.syntheon.in-access.log common
</VirtualHost>
```

**Then enable it:**
```bash
sudo a2ensite devapp-http.conf
sudo apache2ctl configtest
sudo systemctl start apache2
```

