T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.quebec/private_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.quebec/private_html/SERVER_STATUS_REPORT.md
# Server Status Report - lavocat.quebec
**Date:** January 30, 2025  
**Status:** ❌ SERVER DOWN

---

## 🚨 **CURRENT PROBLEM**

### Service Unavailable Error
**Symptom:** Apache shows "Service Unavailable" when accessing lavocat.quebec

**Root Cause:** Node.js server is not running on port 3000

---

## 📊 **WHAT THE LOGS SHOW**

The last server log (`server.log`) shows:
- ✅ Server started successfully on port 3000
- ✅ Next.js ready in 233ms
- ❌ Multiple JWT decryption failures
- ❌ Server likely crashed or was stopped

### Error Details:
```
[next-auth][error][JWT_SESSION_ERROR] 
decryption operation failed
```

**Why:** `NEXTAUTH_SECRET` was changed, old encrypted sessions can't be decrypted.

---

## 🔧 **HOW TO FIX (3 Steps)**

### Step 1: Start the Server

```bash
cd /home/gositeme/domains/lavocat.quebec/public_html

# Option A: Development mode
npm run dev

# Option B: Production mode  
npm run start:production

# Option C: Background process
nohup npx next start -p 3000 > server.log 2>&1 &
```

### Step 2: Verify Server is Running

```bash
# Check if process is running
ps aux | grep node | grep 3000

# Check server response
curl http://localhost:3000/api/auth/csrf

# Check server logs
tail -f server.log
```

### Step 3: Clear Old Sessions (Important!)

Since NEXTAUTH_SECRET changed, users with old sessions will get errors.

**Option A:** Clear browser cookies manually  
**Option B:** Run the cleanup script:
```bash
npm run cleanup-sessions
```

---

## 📋 **CURRENT CONFIGURATION**

### Server Configuration
- **Port:** 3000 (internal)
- **Apache Proxy:** `/api/*` → `http://127.0.0.1:3000/api/*`
- **Environment:** Production mode
- **Database:** SQLite (`prisma/dev.db`)

### Credentials (Test)
- **Email:** admin@example.com
- **Password:** admin123

### Files to Know
- **Server File:** `server-production-simple.js` (or `server-https.js`)
- **Config:** `.env` (or `.env.production`)
- **Database:** `prisma/dev.db` (1.8MB, 20 users, 4 cases)

---

## ⚙️ **RECOMMENDED START COMMAND**

Based on WORKING_CONFIG.md, this should work:

```bash
cd /home/gositeme/domains/lavocat.quebec/public_html
export NODE_ENV=production
export PORT=3443

# Start the production server
npx next start -p 3000 > server.log 2>&1 &

# OR use the built Next.js server
node --max-old-space-size=4096 --expose-gc server-production-simple.js > server.log 2>&1 &

# OR start development mode
npm run dev
```

---

## 🎯 **WHAT TO CHECK AFTER STARTING**

1. ✅ **Server starts** without errors in `server.log`
2. ✅ **Port 3000** is listening: `curl http://localhost:3000`
3. ✅ **Apache proxy** works: `curl https://lavocat.quebec/api/auth/csrf`
4. ✅ **Login page** loads: https://lavocat.quebec/auth/login.html
5. ✅ **No JWT errors** in logs after clearing old cookies

---

## 📝 **TROUBLESHOOTING**

### If Server Won't Start:
```bash
# Check for port conflicts
netstat -tulpn | grep 3000

# Kill existing processes
pkill -f "node.*server" || true
pkill -f "next.*start" || true

# Try again
npm run dev
```

### If JWT Errors Persist:
```bash
# Clear all session cookies from browser
# OR run cleanup script
npm run cleanup-sessions

# Regenerate Prisma client
npx prisma generate

# Restart server
npm run dev
```

### If Apache Can't Connect:
Check Apache proxy configuration in `.htaccess`:
```apache
# Should proxy to 127.0.0.1:3000
RewriteRule ^api/(.*)$ http://127.0.0.1:3000/api/$1 [P,L]
```

---

## ⚠️ **KNOWN ISSUES TO WATCH**

1. **JWT Errors:** Will happen for users with old sessions (expected after secret change)
2. **Database:** Using SQLite instead of MySQL (working but not production-ready)
3. **Email:** SMTP not configured (emails logged to console)
4. **Stripe:** Not configured (payment features disabled)

---

**Last Attempted Start:** See server.log  
**Recommended Action:** Run `npm run dev` to start server  
**Expected Result:** Site accessible, login works after clearing cookies


CasperSecurity Mini