Defining RAM – Random Access Memory
Every computer system relies on memory to process and store data. One of the most…
This article explains how to set up website hosting on a VPS. Hosting a website on a VPS gives you full control over your server environment, better performance, and scalability.
Follow these steps to get started:
Prerequisites:
Step 1: Update Your Server
Log in to your VPS via SSH and update the package list:
sudo apt update && sudo apt upgrade -y
sudo yum update -y
Step 2: Install a Web Server
sudo apt install apache2 -y # Ubuntu sudo systemctl enable apache2 sudo systemctl start apache2
sudo apt install nginx -y # Ubuntu sudo systemctl enable nginx sudo systemctl start nginx
Access your VPS IP in a browser (e.g., http://your-server-ip). You should see a default web server page.
Step 3: Upload Your Website Files
You can upload files using:
scp -r /local/website-folder user@your-vps-ip:/var/www/html
Replace existing index.html if using the default document root..
Step 4: Configure Your Domain (Optional)
Point your domain’s DNS A record to your VPS IP address.
Then configure a virtual host:
Apache Example:
sudo nano /etc/apache2/sites-available/yourdomain.com.conf
Add:
<VirtualHost *:80> ServerName yourdomain.com DocumentRoot /var/www/html </VirtualHost>
Enable the site:
sudo a2ensite yourdomain.com.conf sudo systemctl reload apache2
Step 5: (Optional) Secure with SSL
Install Certbot and configure HTTPS:
For Apache:
sudo apt install certbot python3-certbot-apache -y sudo certbot --apache
For Nginx:
sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx
Your website is now live on your VPS. It offers greater control, flexibility, and performance than shared hosting, making it an ideal solution for growing websites and custom setups. We hope you found this guide helpful.
Find more information about: How to Transfer Backup from cPanel to VPS
Explore more hosting insights, tips and industry updates.
Every computer system relies on memory to process and store data. One of the most…
Until now it might be quite clear what is OpenStack. You simply say that OpenStack…
Webalizer is a popular tool in cPanel/WHM that generates website traffic statistics. Sometimes, you may…