sudo apt install fail2ban
Fail2ban monitors log files and bans suspicious IPs Apache is easier for beginners, while Nginx offers better performance under heavy load.
sudo apt install apache2
sudo systemctl status apache2 Access your server IP in a browser to test.
Create a new config file under /etc/apache2/sites-available/yourdomain.conf and configure your server blocks.
Place your site files in /var/www/yourdomain and set permissions accordingly.
sudo systemctl restart apache2
sudo systemctl enable apache2 sudo apt install mysql-server
sudo mysql_secure_installation sudo apt install php libapache2-mod-php php-mysql Create a file in /var/www/html/:
<?php phpinfo(); ?> Visit your-vps-ip/info.php in a browser.
Use mysql -u root -p to log in and create your database:
CREATE DATABASE mydatabase; DNS translates your domain name to your VPS IP address.
Use your domain registrar’s dashboard to point the A record to your server IP.
Consider Cloudflare for free DNS and extra security, or local DNS for lower latency.
DNS changes can take up to 48 hours. Use tools like dnschecker.org to monitor.
sudo apt install certbot python3-certbot-apache
sudo certbot --apache Certbot auto-configures HTTPS. Manually update Apache configs if needed.
Install unattended upgrades:
sudo apt install unattended-upgrades Schedule backups using cron jobs with rsync or other backup tools.
Use FileZilla or command-line SFTP to upload to /var/www/yourdomain.
sudo chown -R www-data:www-data /var/www/yourdomain Enable your virtual host:
sudo a2ensite yourdomain.conf
sudo systemctl reload apache2 Verify your site loads, DNS resolves, and SSL works. For WordPress users, see Installing WordPress on VPS.
Ensure updates, backups, firewalls, and SSL are active. Review our Linux VPS security guide.
Use tools like UptimeRobot, Netdata, or Nagioses for performance and uptime alerts.
Monitor RAM/CPU via htop. Upgrade when resource usage consistently nears 80%.
Visit Ubuntu forums, Stack Overflow, or local tech groups for support.
By following this comprehensive Linux VPS setup guide, you can confidently host and manage your website in Malaysia. With proper setup, security, and ongoing maintenance, your VPS can support scalable and secure web projects tailored to local needs.
1. Introduction WordPress 6.9, codenamed "Gene," is the final major release of 2025 and one…
1. Introduction to Containerization 1.1 What Is Containerization and Why It Matters Modern software development…
1. Introduction If you've ever wanted to automate repetitive tasks — like syncing data between…
Introduction Survival games have become one of the most enduring and beloved genres in modern…
1. What is Node.js? Node.js lets you use JavaScript to build the "brain" of a…