How to Add Basic Authentication to an Nginx Site Without a Plugin

nginx basic authentication

Sometimes the simplest lock is the right one. You have a staging site, a client preview, or an admin panel on your VPS, and you need it hidden from everyone except a handful of people. A full login system is overkill, and a plugin is another thing to update. That is where nginx basic authentication … Baca Selengkapnya

How to Fix Nginx 403 Forbidden Errors on a Fresh VPS

fix nginx 403 forbidden

A fresh VPS, a clean Nginx install, and a browser that says 403 Forbidden. The server is running, the domain resolves, and yet nothing loads. A fix nginx 403 forbidden error usually comes down to a handful of causes, and the error log names the culprit in plain language. Work through the checks below in … Baca Selengkapnya

Nginx Location Matching Explained: Prefix, Regex, and Exact Matches

nginx location matching

Your Nginx server block looks right, the config test passes, and still the wrong page loads. A request for /api/users lands on your static site, while /images/logo.png gets handed to PHP-FPM. In most cases the cause is nginx location matching, the set of rules that decides which location block handles each request. Those rules are … Baca Selengkapnya

How to Audit SSH Logins on Your VPS with Lastlog and Journalctl

audit ssh logins

Every SSH login leaves a trace. The question is whether anyone ever looks at it. When you audit SSH logins on your VPS, you find out who connected, when, from where, and whether anyone tried and failed. Most VPS owners never check until something breaks or a bill spikes. By then the evidence is gone … Baca Selengkapnya

How to Create a Separate User Account for Each Client on One VPS

separate user account for each client

If you host websites for more than one client on the same server, sharing a single login is asking for trouble. A separate user account for each client on one VPS keeps files, processes, and mistakes apart, so one client’s broken upload or weak password never takes down everyone else’s site. This guide covers the … Baca Selengkapnya

How to Schedule VPS Snapshots Before Every Major Update

schedule vps snapshots

A major update should feel routine, not risky. The difference between the two is a snapshot you took before you started. When you schedule VPS snapshots as part of your update routine, a bad package upgrade, a broken kernel, or a WordPress update that whitescreens the site becomes a ten-minute rollback instead of a lost … Baca Selengkapnya

How to Rename Your VPS Hostname and Set a Proper FQDN

rename vps hostname

Every VPS arrives with a hostname the provider picked for you, and it is usually something like vps-a1b2c3 or ubuntu-2204. It works, but it tells you nothing, and it can quietly cause real problems: mail servers distrust it, log lines become hard to read, and reverse DNS checks fail. Learning how to rename VPS hostname … Baca Selengkapnya