docs: Add nginx configuration dan fix 404 routing issue
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
**Vendor folder TIDAK di-commit ke git repository!**
|
||||
|
||||
Setiap kali deploy atau pull code baru, **WAJIB** jalankan:
|
||||
|
||||
```bash
|
||||
composer install --no-dev --optimize-autoloader
|
||||
```
|
||||
@@ -64,11 +65,13 @@ composer dump-autoload --optimize
|
||||
### 3. Setup aaPanel
|
||||
|
||||
1. **Create Website**:
|
||||
|
||||
- Domain: `api.btekno.cloud`
|
||||
- DocumentRoot: `/www/wwwroot/api.btekno.cloud/api/public`
|
||||
- PHP Version: 8.2 atau 8.3
|
||||
|
||||
2. **PHP Settings**:
|
||||
|
||||
- Enable `extension=pdo_mysql`
|
||||
- Enable `extension=mbstring`
|
||||
- Memory limit: 256M (minimum)
|
||||
@@ -101,6 +104,7 @@ RETRIBUSI_API_KEY=generate-secure-api-key-here
|
||||
```
|
||||
|
||||
**Generate secure keys:**
|
||||
|
||||
```bash
|
||||
# JWT Secret (min 32 characters)
|
||||
openssl rand -base64 32
|
||||
@@ -138,26 +142,33 @@ curl https://api.btekno.cloud/health
|
||||
## 🐛 Common Issues
|
||||
|
||||
### Error: vendor/autoload.php not found
|
||||
|
||||
**Cause**: Vendor folder belum di-install
|
||||
**Solution**:
|
||||
**Solution**:
|
||||
|
||||
```bash
|
||||
cd /www/wwwroot/api.btekno.cloud/api
|
||||
composer install --no-dev --optimize-autoloader
|
||||
```
|
||||
|
||||
### Error: Database connection failed
|
||||
|
||||
**Cause**: Database config salah di `.env`
|
||||
**Solution**:
|
||||
**Solution**:
|
||||
|
||||
- Cek `DB_HOST`, `DB_NAME`, `DB_USER`, `DB_PASS` di `.env`
|
||||
- Test koneksi: `mysql -u sql_retribusi -p sql_retribusi`
|
||||
|
||||
### Error: JWT secret not set
|
||||
|
||||
**Cause**: `JWT_SECRET` kosong di `.env`
|
||||
**Solution**: Generate dan set JWT_SECRET di `.env`
|
||||
|
||||
### Error: Permission denied
|
||||
|
||||
**Cause**: File permission salah
|
||||
**Solution**:
|
||||
**Solution**:
|
||||
|
||||
```bash
|
||||
chown -R www:www /www/wwwroot/api.btekno.cloud/api
|
||||
chmod -R 755 /www/wwwroot/api.btekno.cloud/api
|
||||
@@ -186,4 +197,3 @@ composer install --no-dev --optimize-autoloader
|
||||
# 3. Test endpoint
|
||||
curl https://api.btekno.cloud/health
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user