← Field guide ← Stop 3: Lock the Doors
Stop 4 of 7

Build a Home

Your VPS is locked up tight and completely empty. Time to give it a job: hosting a website.

The job

Right now, it does nothing

A VPS on its own doesn't host a website — it's just a locked, empty computer.

To make it answer when a browser comes knocking, you install a program that specifically listens for that knock and hands back a web page: a web server. You'll install the most common one there is — Apache.

1 Step One

Install the web server

Logged in as your regular user (not root, remember), install Apache:

Apache started itself automatically. But your firewall from Stop 3 only lets SSH through — open the door for the web too:

"Apache Full" opens both the everyday door (port 80) and the padlocked one you'll switch on at Stop 6 (port 443) — one command now saves you a trip back here later.

2 Step Two

Go look

Open a browser — any browser, on any device — and type your VPS's address straight in.

3 Step Three

Add PHP

Give your VPS the ability to run PHP:

4 Step Four

Move in

Apache always looks in one folder for what to show: /var/www/html/. Right now, your account can't write there — it belongs to the system. Hand it to yourself:

Now write your own page over the default one:

Refresh the browser tab from Step 2:

Recap

What your VPS can do now

  • Apache is installed and runninganswers any browser that visits your IP
  • Ports 80 and 443 are opensudo ufw allow 'Apache Full'
  • PHP is installedready for PHP-based sites
  • You own the web folder/var/www/html, editable by you — by hand or by SFTP

It's alive. 🏠

Right now, only your IP address finds it. Next: give it a real name.

Next up → Stop 5: Hang the Sign

My Very First VPS · Stop 4 of 7