Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
cqt /
[ HOME SHELL ]
Name
Size
Permission
Action
dist
[ DIR ]
drwxr-xr-x
node_modules
[ DIR ]
drwxr-xr-x
public
[ DIR ]
drwxr-xr-x
server
[ DIR ]
drwxr-xr-x
src
[ DIR ]
drwxr-xr-x
.env
41
B
-rw-r--r--
.env.example
285
B
-rw-r--r--
README.md
2.09
KB
-rw-r--r--
apache-config.conf
2.78
KB
-rw-r--r--
bun.lockb
196.41
KB
-rw-r--r--
components.json
414
B
-rw-r--r--
deploy.sh
4.87
KB
-rw-r--r--
eslint.config.js
765
B
-rw-r--r--
index.html
1.05
KB
-rw-r--r--
package-lock.json
236.95
KB
-rw-r--r--
package.json
2.69
KB
-rw-r--r--
postcss.config.js
81
B
-rw-r--r--
setup-server.sh
7.51
KB
-rw-r--r--
tailwind.config.ts
3.81
KB
-rw-r--r--
tsconfig.app.json
652
B
-rw-r--r--
tsconfig.json
369
B
-rw-r--r--
tsconfig.node.json
481
B
-rw-r--r--
utils.ts
169
B
-rw-r--r--
vite.config.ts
454
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : setup-server.sh
#!/bin/bash # Server Setup Script for api.sushant4444.me # Run this on your production server after SSH echo "๐ Quantum Technology Centre - Server Setup" echo "============================================" echo "" # Check if running as root if [ "$EUID" -eq 0 ]; then echo "โ ๏ธ Please don't run as root. Run as regular user with sudo access." exit 1 fi # Step 1: Check if backend is running echo "๐ Step 1: Checking backend status..." if pm2 describe quantum-api > /dev/null 2>&1; then echo "โ Backend is running with PM2" pm2 status quantum-api else echo "โ Backend is not running!" echo "Starting backend..." if [ -f "/var/www/quantuminnovate-site/server/index.js" ]; then cd /var/www/quantuminnovate-site/server pm2 start index.js --name quantum-api pm2 save echo "โ Backend started" else echo "โ Backend files not found at /var/www/quantuminnovate-site/server" echo "Please deploy your code first" exit 1 fi fi # Test backend locally echo "" echo "๐งช Testing backend locally..." HEALTH_CHECK=$(curl -s http://localhost:5000/api/health) if [ -z "$HEALTH_CHECK" ]; then echo "โ Backend is not responding on localhost:5000" echo "Check logs with: pm2 logs quantum-api" exit 1 else echo "โ Backend responding: $HEALTH_CHECK" fi # Step 2: Check Nginx echo "" echo "๐ Step 2: Checking Nginx..." if systemctl is-active --quiet nginx; then echo "โ Nginx is running" else echo "โ Nginx is not running" echo "Starting Nginx..." sudo systemctl start nginx sudo systemctl enable nginx fi # Step 3: Create Nginx configuration echo "" echo "โ๏ธ Step 3: Creating Nginx configuration..." sudo tee /etc/nginx/sites-available/quantumtech > /dev/null << 'EOF' # Backend API Server server { listen 80; server_name api.sushant4444.me; # Security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; location / { proxy_pass http://localhost:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_cache_bypass $http_upgrade; # Timeouts proxy_connect_timeout 60s; proxy_send_timeout 60s; proxy_read_timeout 60s; } } # Frontend Website server { listen 80; server_name sushant4444.me www.sushant4444.me; root /var/www/quantuminnovate-site/dist; index index.html; # Gzip compression gzip on; gzip_vary on; gzip_min_length 1024; gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json; # Cache static assets location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ { expires 1y; add_header Cache-Control "public, immutable"; } # React Router - redirect all requests to index.html location / { try_files $uri $uri/ /index.html; } # Security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; } EOF echo "โ Nginx configuration created" # Enable site echo "" echo "๐ Enabling site..." sudo ln -sf /etc/nginx/sites-available/quantumtech /etc/nginx/sites-enabled/ sudo rm -f /etc/nginx/sites-enabled/default # Test Nginx config echo "" echo "๐งช Testing Nginx configuration..." if sudo nginx -t; then echo "โ Nginx configuration is valid" sudo systemctl restart nginx echo "โ Nginx restarted" else echo "โ Nginx configuration has errors" exit 1 fi # Step 4: Configure firewall echo "" echo "๐ฅ Step 4: Configuring firewall..." sudo ufw allow 22/tcp comment 'SSH' sudo ufw allow 80/tcp comment 'HTTP' sudo ufw allow 443/tcp comment 'HTTPS' if sudo ufw status | grep -q "Status: active"; then echo "โ Firewall already active" else echo "Enabling firewall..." echo "y" | sudo ufw enable fi sudo ufw reload echo "โ Firewall configured" echo "" sudo ufw status numbered # Step 5: Test HTTP echo "" echo "๐งช Step 5: Testing HTTP connection..." sleep 2 HTTP_TEST=$(curl -s -o /dev/null -w "%{http_code}" http://api.sushant4444.me/api/health) if [ "$HTTP_TEST" == "200" ]; then echo "โ HTTP connection working! (Status: $HTTP_TEST)" else echo "โ HTTP connection failed (Status: $HTTP_TEST)" echo "Try: curl http://api.sushant4444.me/api/health" fi # Step 6: SSL Certificate echo "" echo "๐ Step 6: SSL Certificate Setup" echo "================================" echo "" if command -v certbot &> /dev/null; then echo "Certbot is installed" read -p "Do you want to obtain SSL certificates now? (y/n): " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "" echo "Obtaining SSL certificates..." echo "This will ask for your email and agreement to terms." echo "" sudo certbot --nginx \ -d api.sushant4444.me \ -d sushant4444.me \ -d www.sushant4444.me \ --non-interactive \ --agree-tos \ --redirect \ --email "your-email@example.com" || { echo "" echo "โ ๏ธ Automated SSL setup failed. Run manually:" echo "sudo certbot --nginx -d api.sushant4444.me -d sushant4444.me -d www.sushant4444.me" } fi else echo "Certbot not installed. Installing..." sudo apt update sudo apt install -y certbot python3-certbot-nginx echo "" echo "Run this command to get SSL certificates:" echo "sudo certbot --nginx -d api.sushant4444.me -d sushant4444.me -d www.sushant4444.me" fi # Summary echo "" echo "============================================" echo "โ Setup Complete!" echo "============================================" echo "" echo "๐ Status Check:" echo " โข Backend: $(pm2 describe quantum-api > /dev/null 2>&1 && echo 'โ Running' || echo 'โ Not Running')" echo " โข Nginx: $(systemctl is-active --quiet nginx && echo 'โ Running' || echo 'โ Not Running')" echo " โข HTTP: $([ "$HTTP_TEST" == "200" ] && echo 'โ Working' || echo 'โ Not Working')" echo "" echo "๐งช Test Your API:" echo " โข HTTP: curl http://api.sushant4444.me/api/health" echo " โข HTTPS: curl https://api.sushant4444.me/api/health" echo "" echo "๐ Monitoring Commands:" echo " โข Backend logs: pm2 logs quantum-api" echo " โข Backend status: pm2 status" echo " โข Nginx logs: sudo tail -f /var/log/nginx/error.log" echo " โข Restart backend: pm2 restart quantum-api" echo " โข Restart Nginx: sudo systemctl restart nginx" echo "" echo "๐ Next Steps:" if ! sudo certbot certificates 2>/dev/null | grep -q "api.sushant4444.me"; then echo " 1. Get SSL certificate:" echo " sudo certbot --nginx -d api.sushant4444.me -d sushant4444.me -d www.sushant4444.me" echo "" fi echo " 2. Update backend .env with production domains" echo " 3. Update frontend .env.production with: VITE_API_URL=https://api.sushant4444.me" echo " 4. Build frontend: npm run build" echo " 5. Test admin portal login" echo "" echo "๐ Documentation:" echo " โข Full guide: TROUBLESHOOT-CONNECTION.md" echo " โข CORS issues: CORS-GUIDE.md" echo ""
Close