VPS Setup¶
Setup VPS on Ubuntu for my personal use. I use VPS for hosting my personal website, blog, testing, and learning purposes.
Overview
A virtual private server(VPS) is a machine that hosts all the software and data required to run an application or website. It is called virtual because it only consumes a portion of the server's underlying physical resources which are managed by a third-party provider. However, you get access to your dedicated resources on that hardware. [Source: aws.amazon.com].
Disclaimer
I use Ubuntu 22.04 LTS for this setup. You can use another version of Ubuntu or another Linux distribution. The steps may vary slightly depending on the distribution you use.
Update Repositories¶
Install Nginx¶
NGINX
NGINX is a popular open-source web server that is also used as a reverse proxy, load balancer, and HTTP cache. It was initially designed to solve the C10k problem, which is the difficulty in handling more than 10,000 simultaneous connections. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. It is used by many of the world's largest websites, including Netflix, Airbnb, and GitHub.
Config Nginx for Static Website (Example)¶
Run in terminal | |
---|---|
Edit yourmenu.escloud.my.id.conf | |
---|---|
Run in terminal | |
---|---|
Pointing Domain to VPS + Cloudflare¶
- Make sure we have a domain, for example, escloud.my.id. If you don't have a domain, you can buy it from a domain provider.
- Login to Cloudflare, add site escloud.my.id
- Copy Cloudflare nameserver
- Paste Cloudflare nameserver to domain provider
- Add A record in Cloudflare