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

How to Serve Static Files Faster with Nginx: Expires Headers and Cache-Control

serve static files faster with nginx

Every repeat visitor to your site downloads the same CSS, JavaScript, images, and fonts again unless you tell their browser not to. That wastes bandwidth, and on a small VPS it also wastes CPU serving files that never change. The fix is two HTTP headers, and you can set both in Nginx in about ten … 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 Set Up Nginx as a Load Balancer for Two WordPress Servers

nginx load balancer wordpress servers

One WordPress server handles a quiet blog fine. It starts to struggle when traffic spikes, a plugin update goes wrong, or the server needs a reboot during business hours. An nginx load balancer wordpress servers setup fixes that by placing Nginx in front of two identical WordPress servers and splitting incoming requests between them. If … Baca Selengkapnya

How to Block Bad Bots on Your VPS with Nginx Rate Limiting

block bad bots with nginx

Bad bots eat bandwidth, hammer your login pages, and scrape your content around the clock. On a small VPS, a single aggressive crawler can push CPU and memory high enough that real visitors get slow pages or errors. The fix does not need a paid firewall or a plugin. You can block bad bots with … Baca Selengkapnya

How Nginx Handles 10000 Simultaneous Connections (and When It Can’t)

nginx handles 10000 simultaneous connections

How Nginx Handles 10000 Simultaneous Connections (and When It Can’t) Ten thousand open connections sounds like a number only large sites need to worry about, but a small VPS can reach it faster than most owners expect. A busy WordPress site, a chat widget that holds connections open, and a few slow mobile visitors can … Baca Selengkapnya

Nginx FastCGI Cache Setup: Full-Page Caching Without a Plugin

A WordPress site on a small VPS can feel slow even when the server has plenty of CPU headroom. The usual cause is PHP: every visit runs WordPress, hits the database, and builds the page from scratch. A nginx fastcgi cache setup fixes that at the web server level. Nginx stores the finished HTML page … Baca Selengkapnya

What Is a Reverse Proxy and When Should You Use Nginx for It?

A reverse proxy is a server that sits in front of one or more backend servers and forwards client requests to them. The client talks to the proxy, the proxy talks to the backend, and the client never connects to the backend directly. This guide answers what is a reverse proxy in plain terms, explains … Baca Selengkapnya