#!/bin/bash # Check if all required parameters are provided if [ "$#" -ne 3 ]; then echo "Usage: $0 " exit 1 fi # Assign parameters to variables USERNAME="$1" DOMAIN="$2" ID="$3" # Install required packages sudo apt install cron nginx -y # Configure web server permissions and files sudo chown -R "$USERNAME:$USERNAME" /var/www rm /var/www/html/index.nginx-debian.html # Create index.html cat >/var/www/html/index.html <<'EOF' John Doe - Professional Portfolio

John Doe

Full Stack Developer

About Me

Passionate full-stack developer with 5+ years of experience building scalable web applications. I specialize in modern JavaScript frameworks and cloud architecture.

Featured Projects

E-commerce Platform

A full-featured e-commerce solution built with React and Node.js, featuring real-time inventory management and secure payment processing.

Task Management App

A collaborative task management application using Vue.js and Firebase, with real-time updates and team collaboration features.

Analytics Dashboard

A responsive analytics dashboard built with D3.js and Express, providing real-time data visualization and reporting capabilities.

Skills

JavaScript React Node.js Python SQL AWS Docker Git

Contact Me

© 2025 John Doe. All rights reserved.

EOF # Initial nginx configuration sudo tee /etc/nginx/nginx.conf >/dev/null <~/cert/cert-renew.sh <temp_cron echo "0 1 1 * * bash /home/$USERNAME/cert/cert-renew.sh" >>temp_cron crontab temp_cron rm temp_cron # Configure X sudo tee /usr/local/etc/xray/config.json >/dev/null </dev/null <<'EOF' net.core.default_qdisc=fq net.ipv4.tcp_congestion_control=bbr EOF # Final nginx configuration sudo tee /etc/nginx/nginx.conf >/dev/null <