================================================================================ ROSIYA.LIFE - INSTALLATION GUIDE ================================================================================ cPanel + NGINX deployment for Linode VPS. Combines File Manager + minimal SSH commands. Stack: Laravel 11 + NGINX + PHP 8.1+ + MySQL 8.0 ================================================================================ QUICK START SUMMARY ================================================================================ 1. Upload .tar.gz via cPanel File Manager 2. Extract and set permissions (755) 3. Create MySQL database via cPanel wizard 4. Configure NGINX via SSH (edit 2 values, copy file) 5. Visit /install in browser 6. Complete 7-step installation wizard 7. Set up cron job Total time: 20-30 minutes ================================================================================ STEP 1: UPLOAD FILES ================================================================================ 1.1 Access cPanel File Manager: - Log into cPanel - Click "File Manager" - Navigate to "public_html" 1.2 Upload Package: - Click "Upload" button - Select rosiya-life-cpanel-nginx.tar.gz - Wait for upload to complete 1.3 Extract Files: - Right-click .tar.gz file → "Extract" - Click "Extract Files" - Wait for extraction 1.4 Move Files: - Open extracted folder - Select All - Click "Move" → Destination: public_html - Delete empty folder and .tar.gz Final Structure: public_html/ ├── app/ ├── config/ ├── public/ ← NGINX document root │ └── index.php ├── storage/ ├── vendor/ ├── deployment/ │ └── nginx/ │ └── cpanel-laravel.conf └── .env.example ================================================================================ STEP 2: SET PERMISSIONS ================================================================================ 2.1 Storage Permissions: - Right-click "storage" → "Change Permissions" - Set to 755 - Check ✓ "Recurse into subdirectories" - Click "Change Permissions" 2.2 Bootstrap/Cache Permissions: - Navigate to bootstrap/cache/ - Right-click "cache" → "Change Permissions" - Set to 755 - Check ✓ "Recurse into subdirectories" - Click "Change Permissions" ================================================================================ STEP 3: CREATE DATABASE ================================================================================ 3.1 Open MySQL Database Wizard: - cPanel → Databases → MySQL Database Wizard 3.2 Create Database: - Name: rosiya_db - Click "Next Step" (cPanel adds prefix: cpanelusername_rosiya_db) 3.3 Create User: - Username: rosiya_user - Click "Password Generator" - SAVE THE PASSWORD! - Click "Use Password" → "Create User" 3.4 Grant Privileges: - Check "ALL PRIVILEGES" - Click "Next Step" 3.5 Save Details: Database Host: localhost Database Name: cpanelusername_rosiya_db Database User: cpanelusername_rosiya_user Database Password: [your saved password] ================================================================================ STEP 4: CONFIGURE NGINX ================================================================================ 4.1 Connect via SSH: ssh root@your-server-ip 4.2 Create Logs Directory: mkdir -p /home/cpanelusername/logs chown cpanelusername:cpanelusername /home/cpanelusername/logs 4.3 Edit NGINX Config: cd /home/cpanelusername/public_html nano deployment/nginx/cpanel-laravel.conf Replace: - USERNAME → your cPanel username - DOMAIN_NAME → your domain name Example: server_name DOMAIN_NAME www.DOMAIN_NAME; becomes: server_name rosiya.life www.rosiya.life; Save: Ctrl+X, Y, Enter 4.4 Copy NGINX Config: cp deployment/nginx/cpanel-laravel.conf /etc/nginx/conf.d/rosiya.conf 4.5 Test NGINX: nginx -t (Should show: syntax is ok) 4.6 Reload NGINX: systemctl reload nginx ================================================================================ STEP 5: CONFIGURE PHP ================================================================================ 5.1 Select PHP Version: - cPanel → Software → Select PHP Version - Select PHP 8.1 or higher 5.2 Enable Extensions: Check these boxes: ✓ bcmath ✓ ctype ✓ curl ✓ fileinfo ✓ json ✓ mbstring ✓ openssl ✓ pdo ✓ pdo_mysql ✓ tokenizer ✓ xml ✓ zip Click "Save" ================================================================================ STEP 6: RUN WEB INSTALLER ================================================================================ 6.1 Access Installer: - Browser: https://yourdomain.com/install 6.2 Installation Steps: STEP 1: Welcome - Click "Continue to Requirements Check" STEP 2: Requirements - Auto-verification - All must be green ✅ - Click "Continue to Environment Setup" STEP 3: Environment Application: - App Name: Rosiya.Life - App URL: https://yourdomain.com - Environment: production - Debug: false Database: - Connection: mysql - Host: localhost - Port: 3306 - Database: cpanelusername_rosiya_db - User: cpanelusername_rosiya_user - Password: [your password] Click "Continue to Dependencies" STEP 4: Dependencies - Pre-installed - Click "Continue to Database Setup" STEP 5: Migration - Click "Run Migrations" - Wait for completion - Click "Continue to Finalize" STEP 6: Finalize - Click "Complete Installation" STEP 7: Complete! - Click "Visit Application Homepage" ================================================================================ STEP 7: POST-INSTALLATION ================================================================================ 7.1 Set Up Cron Job (cPanel): - cPanel → Cron Jobs - Common Settings: Once Per Minute (* * * * *) - Command: cd /home/cpanelusername/public_html && /usr/bin/php artisan schedule:run >> /dev/null 2>&1 - Click "Add New Cron Job" 7.2 Install SSL (cPanel): - cPanel → SSL/TLS Status - Click "Run AutoSSL" - NGINX config already includes SSL! 7.3 Queue Worker (Optional - SSH): If using queues: nano /etc/systemd/system/laravel-worker.service Add: [Unit] Description=Laravel Queue Worker After=network.target [Service] Type=simple User=cpanelusername WorkingDirectory=/home/cpanelusername/public_html ExecStart=/usr/bin/php artisan queue:work Restart=always [Install] WantedBy=multi-user.target Then: systemctl enable laravel-worker systemctl start laravel-worker ================================================================================ VERIFICATION ================================================================================ Check: ✓ Visit https://yourdomain.com - loads ✓ SSL active (green padlock) ✓ Register user works ✓ Database saves records ✓ No 500 errors ✓ Cron job running ================================================================================ TROUBLESHOOTING ================================================================================ Issue: "502 Bad Gateway" Solution: systemctl status ea-php83-php-fpm systemctl restart ea-php83-php-fpm tail -f /home/cpanelusername/logs/laravel_error.log Issue: "500 Internal Server Error" Solution: chmod -R 755 storage bootstrap/cache tail -f storage/logs/laravel.log Issue: "File not found" Solution: nginx -t grep "root" /etc/nginx/conf.d/rosiya.conf systemctl reload nginx Issue: "Database connection failed" Solution: grep "DB_" .env php artisan tinker >>> DB::connection()->getPdo(); ================================================================================ IMPORTANT COMMANDS ================================================================================ NGINX: nginx -t # Test config systemctl reload nginx # Reload systemctl restart nginx # Restart tail -f /var/log/nginx/error.log Laravel: cd /home/cpanelusername/public_html php artisan config:clear php artisan cache:clear php artisan route:list tail -f storage/logs/laravel.log PHP-FPM: systemctl restart ea-php83-php-fpm systemctl status ea-php83-php-fpm ================================================================================ FILE LOCATIONS ================================================================================ Application: /home/cpanelusername/public_html/ NGINX root: /home/cpanelusername/public_html/public/ NGINX config: /etc/nginx/conf.d/rosiya.conf NGINX logs: /home/cpanelusername/logs/ Laravel logs: /home/cpanelusername/public_html/storage/logs/ Environment: /home/cpanelusername/public_html/.env ================================================================================ NEXT STEPS ================================================================================ 1. Configure email settings in .env 2. Set up backups (cPanel Backup) 3. Configure monitoring 4. Review security settings 5. Test all features 6. Review SECURITY.txt ================================================================================ Installation Complete! 🚀 cPanel + NGINX deployment for Linode VPS