Go back learning how to host a site
A deep dive into my efforts to set up this blog.

learning how to host a site

November 24, 2024 (Updated: November 24, 2024)

In this post, we’ll be walking through how i step up my vps to host my site and configuerd my custom email address using my domain

Prerequisites

Software Needed

Technical skills

  1. System Administration
  1. Networking and DNS Management
  1. Software Installation and Configuration
  1. Email Set Up
  1. Problem-Solving and Troubleshooting
  1. Documentation and Communitcation

Accounts and Services

Step-by-Step Guide

Step 1 : Set Up Your VPS

  1. Sign Up and Create a VPS
  1. Access The Server Via SSH :
bash

ssh root@<your-ip-here>
  1. Update The Server :
bash

sudo apt udpate 
sudo apt update -y

Step 2 : Configure The Web Server(Nginx)

  1. Install Nginx :
bash

Sudo apt install nginx -y
  1. Enable Nginx
bash

Sudo systemctl enable nginx
sudo systemctl start nginx
  1. Test Nginx Installation :
bash 

ufw allow 80 
ufw allow 443
  1. Deploy your website :
bash

sudo apt install rsync
bash

rsync -avz -e "ssh" /mnt/c/path/to/local/folder/ root@your-ip-here:/var/www/<your-site>/
bash

sudo nano /etc/nginx/sites-available/<your-site>
server {
   listen 80;
   server_name yourdomain.com www.yourdomain.com;

   root /var/www/<your-site>;
   index index.html index.htm;

   location / {
       try_files $uri $uri/ =404;
   }
}
bash

sudo ln -s /etc/nginx/sites-available/<your-site> /etc/nginx/sites-enabled/
sudo systemctl reload nginx

Step 3 : Configure DNS for Your Domain

  1. Log in to Epik: -Go to Epik and access your domain settings -Update the DNS records:
    • A Record : Points yourdomain to your VPS Ipv4 address
    • AAAA Record : Points yourdomain to your VPS Ipv6 address
  2. Verify DNS Propagation Use a DNS lookup tool to confirm records are live

Step 4 : Setup Email with Titan

  1. Sign Up and Configure Titan Email
    • Create an account on Titan Email
    • Connect Titan to you domain by adding the required DNS records(SPF,DKIM and MX) in Epik
  2. Test Email Functionality
    • Send and receive test emails to confirm everything is working

Step 5: Troubleshooting Common Issues

  1. Cannot connect via ssh
  1. Nginx Configuration Error
  1. DNS propagation Delay

Related Posts

Contact Me Resume