<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/host-a-simple-website-on-a-vps-hwupypwjf" -->

---
title: Host a Simple Website on a VPS | daily.dev
description: A beginner-level walkthrough shows how to host a static HTML website on a VPS. Steps cover logging in via PuTTY, updating packages, installing and enabling...
canonical: https://daily.dev/posts/host-a-simple-website-on-a-vps-hwupypwjf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Host a Simple Website on a VPS | daily.dev
og:description: A beginner-level walkthrough shows how to host a static HTML website on a VPS. Steps cover logging in via PuTTY, updating packages, installing and enabling...
og:url: https://daily.dev/posts/host-a-simple-website-on-a-vps-hwupypwjf
og:image: https://api.daily.dev/og/posts/HwuPypwjf.png
og:image:alt: Host a Simple Website on a VPS
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Host a Simple Website on a VPS

**[Randika Dilshan](https://daily.dev/sources/w1epop2yoooafxckzx8ex)** · [@rdilshan](https://daily.dev/rdilshan) · 3 min read · 0 upvotes · 0 comments

## Summary

A beginner-level walkthrough shows how to host a static HTML website on a VPS. Steps cover logging in via PuTTY, updating packages, installing and enabling Apache, verifying the install through a browser, installing Git, and cloning a GitHub repo into /var/www/html/ to deploy the site. The piece is part three of a VPS series, with the next installment promising a PHP deployment guide.

## Content

![image.png](https://media.daily.dev/image/upload/s--gGZJVvRD--/f_auto/v1790127267/ugc/content_d89d0372-aa69-4a6f-9ac8-1d9f5d270767?_a=BAMAMicg0)

Okay, this is my article series for VPS handling, thrid part one. I tell you , if you did not previous article, first read it and come back to this one.

- Free $200 credit on DigitalOcean
- How to Create a VPS on DigitalOcean

Let’s start today ‘s part ; today we will create a simple HTML website hosted on our VPS . First, you should log into your VPS through PuTTY .

![](https://miro.medium.com/v2/resize:fit:963/1*Hl9YOd4CcRbkdJ67ZorQXg.png)

Frist we should update the package on vps.

```
sudo apt update
```

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*-bk9VMQ4axCYFOSFigdx4g.png)

The most commonly used web servers are Nginx and Apache. Today, we use the Apache server to host the website. Now, install the Apache server.

```
sudo apt install apache2 –y
```

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*wxRaPclI768x91TMx8VU_g.png)

You can verify whether it is installed correctly or not.

```
apache2 –v
```

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*BBTWuO_DgKxOBrBJ0qycDA.png)

Then we Start Apache server,

```
sudo systemctl start apache2
```

Then we enable Apache on boot

```
sudo systemctl enable apache2
```

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*vQeT88Hxzx1U7gd7a7g0bQ.png)

You can check it correctly by entering your VPS IP address in the web browser.

```
http://<vps ip address >/
```

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*sUjsDmHlZByIG6wA74ReqQ.png)

Like the output you can see, you have correctly installed the Apache server. I am deploying this GitHub repo: [https://github.com/Rdilshan-community-hub/Day_1.git](https://github.com/Rdilshan-community-hub/Day_1.git)

We should clone that code on our VPS, so we need to install Git on our VPS.

```
sudo apt install git –y
```

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*4zIvavAndFZ2bPbHpNp0eg.png)

Then we should navigate the /var/www/html/

```
cd /var/www/html/
```

That inside have index.html file we should delete that file

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*ENLDfMYn_T84Lh2r6ErKpA.png)

Inside that path clone our repo.

```
git clone https://github.com/Rdilshan-community-hub/Day_1.git
```

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*G28RkdAZmUn0dFCrDGI4Cg.png)

Then, inside that folder, you can see the details of the repo. You can view that detail, and then you successfully deploy your site. Next, go to a web browser and enter the IP address; you will see that site

Press enter or click to view image in full size

![](https://miro.medium.com/v2/resize:fit:963/1*Nv7SFdlnXJlXH12wrxBTIA.png)

In the next article, we will discuss how to host a simple PHP web application on your VPS

#VPSHosting #WebsiteHosting #ApacheServer #HTMLHosting #VPSGuide #BeginnerVPS #LinuxServer #GitDeployment #SimpleWebsite #WebDevelopment #ServerSetup #TechTutorial #LearnHosting #VPSBasics

## Similar posts on daily.dev

- [Hosting a Static Website Using Amazon S3](https://daily.dev/posts/hosting-a-static-website-using-amazon-s3-3na337wdi) · Medium · 0 upvotes · 0 comments
- [Setup a Simple, Self-Hosted Web Server with OpenBSD](https://daily.dev/posts/setup-a-simple-self-hosted-web-server-with-openbsd-d2zabtuhz) · Lobsters · 0 upvotes · 0 comments
- [GitHub for Beginners: Getting started with GitHub Pages](https://daily.dev/posts/github-for-beginners-getting-started-with-github-pages-jmwkcmpj0) · GitHub Blog · 0 upvotes · 0 comments
- [VirtualHost And Subdomains](https://daily.dev/posts/virtualhost-and-subdomains-a2adtn2yh) · InfoSec Write-ups · 0 upvotes · 0 comments

---

Tags: [#git](https://daily.dev/tags/git), [#apache](https://daily.dev/tags/apache), [#digitalocean](https://daily.dev/tags/digitalocean)

[View this post on daily.dev](https://daily.dev/posts/host-a-simple-website-on-a-vps-hwupypwjf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/host-a-simple-website-on-a-vps-hwupypwjf","headline":"Host a Simple Website on a VPS","text":"A beginner-level walkthrough shows how to host a static HTML website on a VPS. Steps cover logging in via PuTTY, updating packages, installing and enabling Apache, verifying the install through a browser, installing Git, and cloning a GitHub repo into /var/www/html/ to deploy the site. The piece is part three of a VPS series, with the next installment promising a PHP deployment guide.","url":"https://daily.dev/posts/host-a-simple-website-on-a-vps-hwupypwjf","datePublished":"2026-09-23T01:36:08.660Z","dateModified":"2026-09-23T01:36:23.906Z","author":{"@type":"Person","name":"Randika Dilshan","url":"https://daily.dev/rdilshan","image":"https://lh3.googleusercontent.com/a/ACg8ocLg5gm9TPnneAjhvFY-R87LyjMI49Q-SXk1ASVSrpk3CMjz534=s96-c","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":20}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/w1epop2yoooafxckzx8ex","name":"Randika Dilshan"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Randika Dilshan","item":"https://daily.dev/sources/w1epop2yoooafxckzx8ex"},{"@type":"ListItem","position":3,"name":"Host a Simple Website on a VPS"}]}
```

